home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11inc.lha / X11 / xlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-09  |  99.5 KB  |  4,338 lines

  1. /* $XConsortium: Xlib.h,v 11.215 91/07/22 15:42:38 rws Exp $ */
  2. /* 
  3.  * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided 
  7.  * that the above copyright notice appear in all copies and that both that 
  8.  * copyright notice and this permission notice appear in supporting 
  9.  * documentation, and that the name of M.I.T. not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific, 
  11.  * written prior permission. M.I.T. makes no representations about the 
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * X Window System is a Trademark of MIT.
  16.  *
  17.  */
  18.  
  19.  
  20. /*
  21.  *    Xlib.h - Header definition and support file for the C subroutine
  22.  *    interface library (Xlib) to the X Window System Protocol (V11).
  23.  *    Structures and symbols starting with "_" are private to the library.
  24.  */
  25. #ifndef _XLIB_H_
  26. #define _XLIB_H_
  27.  
  28. #define XlibSpecificationRelease 5
  29.  
  30. #define strncasecmp strnicmp
  31. #define strcasecmp stricmp
  32.  
  33. #ifdef USG
  34. #ifndef __TYPES__
  35. #include <sys/types.h>            /* forgot to protect it... */
  36. #define __TYPES__
  37. #endif /* __TYPES__ */
  38. #else
  39. #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
  40. #undef _POSIX_SOURCE
  41. #include <sys/types.h>
  42. #define _POSIX_SOURCE
  43. #else
  44. #include <sys/types.h>
  45. #endif
  46. #endif /* USG */
  47.  
  48. #include <X11/X.h>
  49.  
  50. /* applications should not depend on these two headers being included! */
  51. #include <X11/Xfuncproto.h>
  52. #include <X11/Xosdefs.h>
  53.  
  54. #ifndef X_WCHAR
  55. #ifdef X_NOT_STDC_ENV
  56. #define X_WCHAR
  57. #endif
  58. #endif
  59.  
  60. #ifndef X_WCHAR
  61. #include <stddef.h>
  62. #else
  63. /* replace this with #include or typedef appropriate for your system */
  64. typedef unsigned long wchar_t;
  65. #endif
  66.  
  67. typedef char *XPointer;
  68.  
  69. #ifdef AMIGA
  70. #include <exec/types.h>
  71. #include <devices/timer.h>
  72. #define tv_sec tv_secs
  73. #define tv_usec tv_micro
  74. #endif
  75.  
  76. #define Bool int
  77. #define Status int
  78. #define True 1
  79. #define False 0
  80.  
  81. #define QueuedAlready 0
  82. #define QueuedAfterReading 1
  83. #define QueuedAfterFlush 2
  84.  
  85. #define ConnectionNumber(dpy)     ((dpy)->fd)
  86. #define RootWindow(dpy, scr)     (((dpy)->screens[(scr)]).root)
  87. #define DefaultScreen(dpy)     ((dpy)->default_screen)
  88. #define DefaultRootWindow(dpy)     (((dpy)->screens[(dpy)->default_screen]).root)
  89. #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
  90. #define DefaultGC(dpy, scr)     (((dpy)->screens[(scr)]).default_gc)
  91. #define BlackPixel(dpy, scr)     (((dpy)->screens[(scr)]).black_pixel)
  92. #define WhitePixel(dpy, scr)     (((dpy)->screens[(scr)]).white_pixel)
  93. #define AllPlanes         ((unsigned long)~0L)
  94. #define QLength(dpy)         ((dpy)->qlen)
  95. #define DisplayWidth(dpy, scr)     (((dpy)->screens[(scr)]).width)
  96. #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
  97. #define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
  98. #define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
  99. #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  100. #define DisplayCells(dpy, scr)     (DefaultVisual((dpy), (scr))->map_entries)
  101. #define ScreenCount(dpy)     ((dpy)->nscreens)
  102. #define ServerVendor(dpy)     ((dpy)->vendor)
  103. #define ProtocolVersion(dpy)     ((dpy)->proto_major_version)
  104. #define ProtocolRevision(dpy)     ((dpy)->proto_minor_version)
  105. #define VendorRelease(dpy)     ((dpy)->release)
  106. #define DisplayString(dpy)     ((dpy)->display_name)
  107. #define DefaultDepth(dpy, scr)     (((dpy)->screens[(scr)]).root_depth)
  108. #define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
  109. #define BitmapUnit(dpy)     ((dpy)->bitmap_unit)
  110. #define BitmapBitOrder(dpy)     ((dpy)->bitmap_bit_order)
  111. #define BitmapPad(dpy)         ((dpy)->bitmap_pad)
  112. #define ImageByteOrder(dpy)     ((dpy)->byte_order)
  113. #define NextRequest(dpy)    ((dpy)->request + 1)
  114. #define LastKnownRequestProcessed(dpy)    ((dpy)->last_request_read)
  115.  
  116. /* macros for screen oriented applications (toolkit) */
  117. #define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
  118. #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
  119. #define DisplayOfScreen(s)    ((s)->display)
  120. #define RootWindowOfScreen(s)    ((s)->root)
  121. #define BlackPixelOfScreen(s)    ((s)->black_pixel)
  122. #define WhitePixelOfScreen(s)    ((s)->white_pixel)
  123. #define DefaultColormapOfScreen(s)((s)->cmap)
  124. #define DefaultDepthOfScreen(s)    ((s)->root_depth)
  125. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  126. #define DefaultVisualOfScreen(s)((s)->root_visual)
  127. #define WidthOfScreen(s)    ((s)->width)
  128. #define HeightOfScreen(s)    ((s)->height)
  129. #define WidthMMOfScreen(s)    ((s)->mwidth)
  130. #define HeightMMOfScreen(s)    ((s)->mheight)
  131. #define PlanesOfScreen(s)    ((s)->root_depth)
  132. #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
  133. #define MinCmapsOfScreen(s)    ((s)->min_maps)
  134. #define MaxCmapsOfScreen(s)    ((s)->max_maps)
  135. #define DoesSaveUnders(s)    ((s)->save_unders)
  136. #define DoesBackingStore(s)    ((s)->backing_store)
  137. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  138.  
  139. /*
  140.  * Extensions need a way to hang private data on some structures.
  141.  */
  142. typedef struct _XExtData {
  143.     int number;        /* number returned by XRegisterExtension */
  144.     struct _XExtData *next;    /* next item on list of data for structure */
  145.     int (*free_private)();    /* called to free private storage */
  146.     XPointer private_data;    /* data private to this extension. */
  147. } XExtData;
  148.  
  149. /*
  150.  * This file contains structures used by the extension mechanism.
  151.  */
  152. typedef struct {        /* public to extension, cannot be changed */
  153.     int extension;        /* extension number */
  154.     int major_opcode;    /* major op-code assigned by server */
  155.     int first_event;    /* first event number for the extension */
  156.     int first_error;    /* first error number for the extension */
  157. } XExtCodes;
  158.  
  159. /*
  160.  * Data structure for retrieving info about pixmap formats.
  161.  */
  162.  
  163. typedef struct {
  164.     int depth;
  165.     int bits_per_pixel;
  166.     int scanline_pad;
  167. } XPixmapFormatValues;
  168.  
  169.  
  170. /*
  171.  * Data structure for setting graphics context.
  172.  */
  173. typedef struct {
  174.     int function;        /* logical operation */
  175.     unsigned long plane_mask;/* plane mask */
  176.     unsigned long foreground;/* foreground pixel */
  177.     unsigned long background;/* background pixel */
  178.     int line_width;        /* line width */
  179.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  180.     int cap_style;          /* CapNotLast, CapButt, 
  181.                    CapRound, CapProjecting */
  182.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  183.     int fill_style;         /* FillSolid, FillTiled, 
  184.                    FillStippled, FillOpaeueStippled */
  185.     int fill_rule;          /* EvenOddRule, WindingRule */
  186.     int arc_mode;        /* ArcChord, ArcPieSlice */
  187.     Pixmap tile;        /* tile pixmap for tiling operations */
  188.     Pixmap stipple;        /* stipple 1 plane pixmap for stipping */
  189.     int ts_x_origin;    /* offset for tile or stipple operations */
  190.     int ts_y_origin;
  191.         Font font;            /* default text font for text operations */
  192.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  193.     Bool graphics_exposures;/* boolean, should exposures be generated */
  194.     int clip_x_origin;    /* origin for clipping */
  195.     int clip_y_origin;
  196.     Pixmap clip_mask;    /* bitmap clipping; other calls for rects */
  197.     int dash_offset;    /* patterned/dashed line information */
  198.     char dashes;
  199. } XGCValues;
  200.  
  201. /*
  202.  * Graphics context.  The contents of this structure are implementation
  203.  * dependent.  A GC should be treated as opaque by application code.
  204.  */
  205.  
  206. typedef struct _XGC {
  207.     XExtData *ext_data;    /* hook for extension to hang data */
  208.     GContext gid;    /* protocol ID for graphics context */
  209.     Bool rects;        /* boolean: TRUE if clipmask is list of rectangles */
  210.     Bool dashes;    /* boolean: TRUE if dash-list is really a list */
  211.     unsigned long dirty;/* cache dirty bits */
  212.     XGCValues values;    /* shadow structure of values */
  213. } *GC;
  214.  
  215.  
  216. /*
  217.  * Visual structure; contains information about colormapping possible.
  218.  */
  219. typedef struct {
  220.     XExtData *ext_data;    /* hook for extension to hang data */
  221.     VisualID visualid;    /* visual id of this visual */
  222. #if defined(__cplusplus) || defined(c_plusplus)
  223.     int c_class;        /* C++ class of screen (monochrome, etc.) */
  224. #else
  225.     int class;        /* class of screen (monochrome, etc.) */
  226. #endif
  227.     unsigned long red_mask, green_mask, blue_mask;    /* mask values */
  228.     int bits_per_rgb;    /* log base 2 of distinct color values */
  229.     int map_entries;    /* color map entries */
  230. } Visual;
  231.  
  232. /*
  233.  * Depth structure; contains information for each possible depth.
  234.  */    
  235. typedef struct {
  236.     int depth;        /* this depth (Z) of the depth */
  237.     int nvisuals;        /* number of Visual types at this depth */
  238.     Visual *visuals;    /* list of visuals possible at this depth */
  239. } Depth;
  240.  
  241. /*
  242.  * Information about the screen.  The contents of this structure are
  243.  * implementation dependent.  A Screen should be treated as opaque
  244.  * by application code.
  245.  */
  246. typedef struct {
  247.     XExtData *ext_data;    /* hook for extension to hang data */
  248.     struct _XDisplay *display;/* back pointer to display structure */
  249.     Window root;        /* Root window id. */
  250.     int width, height;    /* width and height of screen */
  251.     int mwidth, mheight;    /* width and height of  in millimeters */
  252.     int ndepths;        /* number of depths possible */
  253.     Depth *depths;        /* list of allowable depths on the screen */
  254.     int root_depth;        /* bits per pixel */
  255.     Visual *root_visual;    /* root visual */
  256.     GC default_gc;        /* GC for the root root visual */
  257.     Colormap cmap;        /* default color map */
  258.     unsigned long white_pixel;
  259.     unsigned long black_pixel;    /* White and Black pixel values */
  260.     int max_maps, min_maps;    /* max and min color maps */
  261.     int backing_store;    /* Never, WhenMapped, Always */
  262.     Bool save_unders;    
  263.     long root_input_mask;    /* initial root input mask */
  264. } Screen;
  265.  
  266. /*
  267.  * Format structure; describes ZFormat data the screen will understand.
  268.  */
  269. typedef struct {
  270.     XExtData *ext_data;    /* hook for extension to hang data */
  271.     int depth;        /* depth of this image format */
  272.     int bits_per_pixel;    /* bits/pixel at this depth */
  273.     int scanline_pad;    /* scanline must padded to this multiple */
  274. } ScreenFormat;
  275.  
  276. /*
  277.  * Data structure for setting window attributes.
  278.  */
  279. typedef struct {
  280.     Pixmap background_pixmap;    /* background or None or ParentRelative */
  281.     unsigned long background_pixel;    /* background pixel */
  282.     Pixmap border_pixmap;    /* border of the window */
  283.     unsigned long border_pixel;    /* border pixel value */
  284.     int bit_gravity;        /* one of bit gravity values */
  285.     int win_gravity;        /* one of the window gravity values */
  286.     int backing_store;        /* NotUseful, WhenMapped, Always */
  287.     unsigned long backing_planes;/* planes to be preseved if possible */
  288.     unsigned long backing_pixel;/* value to use in restoring planes */
  289.     Bool save_under;        /* should bits under be saved? (popups) */
  290.     long event_mask;        /* set of events that should be saved */
  291.     long do_not_propagate_mask;    /* set of events that should not propagate */
  292.     Bool override_redirect;    /* boolean value for override-redirect */
  293.     Colormap colormap;        /* color map to be associated with window */
  294.     Cursor cursor;        /* cursor to be displayed (or None) */
  295. } XSetWindowAttributes;
  296.  
  297. typedef struct {
  298.     int x, y;            /* location of window */
  299.     int width, height;        /* width and height of window */
  300.     int border_width;        /* border width of window */
  301.     int depth;              /* depth of window */
  302.     Visual *visual;        /* the associated visual structure */
  303.     Window root;            /* root of screen containing window */
  304. #if defined(__cplusplus) || defined(c_plusplus)
  305.     int c_class;        /* C++ InputOutput, InputOnly*/
  306. #else
  307.     int class;            /* InputOutput, InputOnly*/
  308. #endif
  309.     int bit_gravity;        /* one of bit gravity values */
  310.     int win_gravity;        /* one of the window gravity values */
  311.     int backing_store;        /* NotUseful, WhenMapped, Always */
  312.     unsigned long backing_planes;/* planes to be preserved if possible */
  313.     unsigned long backing_pixel;/* value to be used when restoring planes */
  314.     Bool save_under;        /* boolean, should bits under be saved? */
  315.     Colormap colormap;        /* color map to be associated with window */
  316.     Bool map_installed;        /* boolean, is color map currently installed*/
  317.     int map_state;        /* IsUnmapped, IsUnviewable, IsViewable */
  318.     long all_event_masks;    /* set of events all people have interest in*/
  319.     long your_event_mask;    /* my event mask */
  320.     long do_not_propagate_mask; /* set of events that should not propagate */
  321.     Bool override_redirect;    /* boolean value for override-redirect */
  322.     Screen *screen;        /* back pointer to correct screen */
  323. } XWindowAttributes;
  324.  
  325. /*
  326.  * Data structure for host setting; getting routines.
  327.  *
  328.  */
  329.  
  330. typedef struct {
  331.     int family;        /* for example FamilyInternet */
  332.     int length;        /* length of address, in bytes */
  333.     char *address;        /* pointer to where to find the bytes */
  334. } XHostAddress;
  335.  
  336. /*
  337.  * Data structure for "image" data, used by image manipulation routines.
  338.  */
  339. typedef struct _XImage {
  340.     int width, height;        /* size of image */
  341.     int xoffset;        /* number of pixels offset in X direction */
  342.     int format;            /* XYBitmap, XYPixmap, ZPixmap */
  343.     char *data;            /* pointer to image data */
  344.     int byte_order;        /* data byte order, LSBFirst, MSBFirst */
  345.     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
  346.     int bitmap_bit_order;    /* LSBFirst, MSBFirst */
  347.     int bitmap_pad;        /* 8, 16, 32 either XY or ZPixmap */
  348.     int depth;            /* depth of image */
  349.     int bytes_per_line;        /* accelarator to next line */
  350.     int bits_per_pixel;        /* bits per pixel (ZPixmap) */
  351.     unsigned long red_mask;    /* bits in z arrangment */
  352.     unsigned long green_mask;
  353.     unsigned long blue_mask;
  354.     XPointer obdata;        /* hook for the object routines to hang on */
  355.     struct funcs {        /* image manipulation routines */
  356.     struct _XImage *(*create_image)();
  357. #if NeedFunctionPrototypes
  358. #ifdef __cplusplus
  359.     int (* destroy_image)        (struct _XImage *);
  360. #else
  361.     int (* __stdargs destroy_image)        (struct _XImage *);
  362. #endif
  363.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  364.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  365.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  366.     int (*add_pixel)            (struct _XImage *, long);
  367. #else
  368.     int (* destroy_image)();
  369.     unsigned long (*get_pixel)();
  370.     int (*put_pixel)();
  371.     struct _XImage *(*sub_image)();
  372.     int (*add_pixel)();
  373. #endif
  374.     } f;
  375. } XImage;
  376.  
  377. /* 
  378.  * Data structure for XReconfigureWindow
  379.  */
  380. typedef struct {
  381.     int x, y;
  382.     int width, height;
  383.     int border_width;
  384.     Window sibling;
  385.     int stack_mode;
  386. } XWindowChanges;
  387.  
  388. /*
  389.  * Data structure used by color operations
  390.  */
  391. typedef struct {
  392.     unsigned long pixel;
  393.     unsigned short red, green, blue;
  394.     char flags;  /* do_red, do_green, do_blue */
  395.     char pad;
  396. } XColor;
  397.  
  398. /* 
  399.  * Data structures for graphics operations.  On most machines, these are
  400.  * congruent with the wire protocol structures, so reformatting the data
  401.  * can be avoided on these architectures.
  402.  */
  403. typedef struct {
  404.     short x1, y1, x2, y2;
  405. } XSegment;
  406.  
  407. typedef struct {
  408.     short x, y;
  409. } XPoint;
  410.     
  411. typedef struct {
  412.     short x, y;
  413.     unsigned short width, height;
  414. } XRectangle;
  415.     
  416. typedef struct {
  417.     short x, y;
  418.     unsigned short width, height;
  419.     short angle1, angle2;
  420. } XArc;
  421.  
  422.  
  423. /* Data structure for XChangeKeyboardControl */
  424.  
  425. typedef struct {
  426.         int key_click_percent;
  427.         int bell_percent;
  428.         int bell_pitch;
  429.         int bell_duration;
  430.         int led;
  431.         int led_mode;
  432.         int key;
  433.         int auto_repeat_mode;   /* On, Off, Default */
  434. } XKeyboardControl;
  435.  
  436. /* Data structure for XGetKeyboardControl */
  437.  
  438. typedef struct {
  439.         int key_click_percent;
  440.     int bell_percent;
  441.     unsigned int bell_pitch, bell_duration;
  442.     unsigned long led_mask;
  443.     int global_auto_repeat;
  444.     char auto_repeats[32];
  445. } XKeyboardState;
  446.  
  447. /* Data structure for XGetMotionEvents.  */
  448.  
  449. typedef struct {
  450.         Time time;
  451.     short x, y;
  452. } XTimeCoord;
  453.  
  454. /* Data structure for X{Set,Get}ModifierMapping */
  455.  
  456. typedef struct {
  457.      int max_keypermod;    /* The server's max # of keys per modifier */
  458.      KeyCode *modifiermap;    /* An 8 by max_keypermod array of modifiers */
  459. } XModifierKeymap;
  460.  
  461. /*
  462.  * Display datatype maintaining display specific data.
  463.  * The contents of this structure are implementation dependent.
  464.  * A Display should be treated as opaque by application code.
  465.  */
  466. typedef struct _XDisplay {
  467.     XExtData *ext_data;    /* hook for extension to hang data */
  468.     struct _XFreeFuncs *free_funcs; /* internal free functions */
  469.     int fd;            /* Network socket. */
  470.     int lock;        /* is someone in critical section? */
  471.     int proto_major_version;/* maj. version of server's X protocol */
  472.     int proto_minor_version;/* minor version of servers X protocol */
  473.     char *vendor;        /* vendor of the server hardware */
  474.         XID resource_base;    /* resource ID base */
  475.     XID resource_mask;    /* resource ID mask bits */
  476.     XID resource_id;    /* allocator current ID */
  477.     int resource_shift;    /* allocator shift to correct bits */
  478.     XID (*resource_alloc)(); /* allocator function */
  479.     int byte_order;        /* screen byte order, LSBFirst, MSBFirst */
  480.     int bitmap_unit;    /* padding and data requirements */
  481.     int bitmap_pad;        /* padding requirements on bitmaps */
  482.     int bitmap_bit_order;    /* LeastSignificant or MostSignificant */
  483.     int nformats;        /* number of pixmap formats in list */
  484.     ScreenFormat *pixmap_format;    /* pixmap format list */
  485.     int vnumber;        /* Xlib's X protocol version number. */
  486.     int release;        /* release of the server */
  487.     struct _XSQEvent *head, *tail;    /* Input event queue. */
  488.     int qlen;        /* Length of input event queue */
  489.     unsigned long last_request_read; /* seq number of last event read */
  490.     unsigned long request;    /* sequence number of last request. */
  491.     char *last_req;        /* beginning of last request, or dummy */
  492.     char *buffer;        /* Output buffer starting address. */
  493.     char *bufptr;        /* Output buffer index pointer. */
  494.     char *bufmax;        /* Output buffer maximum+1 address. */
  495.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  496.     struct _XrmHashBucketRec *db;
  497.     int (*synchandler)();    /* Synchronization handler */
  498.     char *display_name;    /* "host:display" string used on this connect*/
  499.     int default_screen;    /* default screen for operations */
  500.     int nscreens;        /* number of screens on this server*/
  501.     Screen *screens;    /* pointer to list of screens */
  502.     unsigned long motion_buffer;    /* size of motion buffer */
  503.     Window current;        /* for use internally for Keymap notify */
  504.     int min_keycode;    /* minimum defined keycode */
  505.     int max_keycode;    /* maximum defined keycode */
  506.     KeySym *keysyms;    /* This server's keysyms */
  507.     XModifierKeymap *modifiermap;    /* This server's modifier keymap */
  508.     int keysyms_per_keycode;/* number of rows */
  509.     char *xdefaults;    /* contents of defaults from server */
  510.     char *scratch_buffer;    /* place to hang scratch buffer */
  511.     unsigned long scratch_length;    /* length of scratch buffer */
  512.     int ext_number;        /* extension number on this display */
  513.     struct _XExten *ext_procs; /* extensions initialized on this display */
  514.     /*
  515.      * the following can be fixed size, as the protocol defines how
  516.      * much address space is available. 
  517.      * While this could be done using the extension vector, there
  518.      * may be MANY events processed, so a search through the extension
  519.      * list to find the right procedure for each event might be
  520.      * expensive if many extensions are being used.
  521.      */
  522.     Bool (*event_vec[128])();  /* vector for wire to event */
  523.     Status (*wire_vec[128])(); /* vector for event to wire */
  524.     KeySym lock_meaning;       /* for XLookupString */
  525.     struct _XKeytrans *key_bindings; /* for XLookupString */
  526.     Font cursor_font;       /* for XCreateFontCursor */
  527.     struct _XDisplayAtoms *atoms; /* for XInternAtom */
  528.     struct {           /* for XReconfigureWMWindow */
  529.         long sequence_number;
  530.         int (*old_handler)();
  531.         Bool succeeded;
  532.     } reconfigure_wm_window;
  533.     unsigned long flags;       /* internal connection flags */
  534.     unsigned int mode_switch;  /* keyboard group modifiers */
  535.     struct _XContextDB *context_db; /* context database */
  536.     Bool (**error_vec)();      /* vector for wire to error */
  537.     /*
  538.      * Xcms information
  539.      */
  540.     struct {
  541.        XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
  542.        XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
  543.        XPointer perVisualIntensityMaps;
  544.                   /* linked list of XcmsIntensityMap */
  545.     } cms;
  546.     int conn_checker;         /* ugly thing used by _XEventsQueued */
  547.     struct _XIMFilter *im_filters;
  548. } Display;
  549.  
  550. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  551. #undef _XEVENT_
  552. #endif
  553. #ifndef _XEVENT_
  554. /*
  555.  * Definitions of specific events.
  556.  */
  557. typedef struct {
  558.     int type;        /* of event */
  559.     unsigned long serial;    /* # of last request processed by server */
  560.     Bool send_event;    /* true if this came from a SendEvent request */
  561.     Display *display;    /* Display the event was read from */
  562.     Window window;            /* "event" window it is reported relative to */
  563.     Window root;            /* root window that the event occured on */
  564.     Window subwindow;    /* child window */
  565.     Time time;        /* milliseconds */
  566.     int x, y;        /* pointer x, y coordinates in event window */
  567.     int x_root, y_root;    /* coordinates relative to root */
  568.     unsigned int state;    /* key or button mask */
  569.     unsigned int keycode;    /* detail */
  570.     Bool same_screen;    /* same screen flag */
  571. } XKeyEvent;
  572. typedef XKeyEvent XKeyPressedEvent;
  573. typedef XKeyEvent XKeyReleasedEvent;
  574.  
  575. typedef struct {
  576.     int type;        /* of event */
  577.     unsigned long serial;    /* # of last request processed by server */
  578.     Bool send_event;    /* true if this came from a SendEvent request */
  579.     Display *display;    /* Display the event was read from */
  580.     Window window;            /* "event" window it is reported relative to */
  581.     Window root;            /* root window that the event occured on */
  582.     Window subwindow;    /* child window */
  583.     Time time;        /* milliseconds */
  584.     int x, y;        /* pointer x, y coordinates in event window */
  585.     int x_root, y_root;    /* coordinates relative to root */
  586.     unsigned int state;    /* key or button mask */
  587.     unsigned int button;    /* detail */
  588.     Bool same_screen;    /* same screen flag */
  589. } XButtonEvent;
  590. typedef XButtonEvent XButtonPressedEvent;
  591. typedef XButtonEvent XButtonReleasedEvent;
  592.  
  593. typedef struct {
  594.     int type;        /* of event */
  595.     unsigned long serial;    /* # of last request processed by server */
  596.     Bool send_event;    /* true if this came from a SendEvent request */
  597.     Display *display;    /* Display the event was read from */
  598.     Window window;            /* "event" window reported relative to */
  599.     Window root;            /* root window that the event occured on */
  600.     Window subwindow;    /* child window */
  601.     Time time;        /* milliseconds */
  602.     int x, y;        /* pointer x, y coordinates in event window */
  603.     int x_root, y_root;    /* coordinates relative to root */
  604.     unsigned int state;    /* key or button mask */
  605.     char is_hint;        /* detail */
  606.     Bool same_screen;    /* same screen flag */
  607. } XMotionEvent;
  608. typedef XMotionEvent XPointerMovedEvent;
  609.  
  610. typedef struct {
  611.     int type;        /* of event */
  612.     unsigned long serial;    /* # of last request processed by server */
  613.     Bool send_event;    /* true if this came from a SendEvent request */
  614.     Display *display;    /* Display the event was read from */
  615.     Window window;            /* "event" window reported relative to */
  616.     Window root;            /* root window that the event occured on */
  617.     Window subwindow;    /* child window */
  618.     Time time;        /* milliseconds */
  619.     int x, y;        /* pointer x, y coordinates in event window */
  620.     int x_root, y_root;    /* coordinates relative to root */
  621.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  622.     int detail;
  623.     /*
  624.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  625.      * NotifyNonlinear,NotifyNonlinearVirtual
  626.      */
  627.     Bool same_screen;    /* same screen flag */
  628.     Bool focus;        /* boolean focus */
  629.     unsigned int state;    /* key or button mask */
  630. } XCrossingEvent;
  631. typedef XCrossingEvent XEnterWindowEvent;
  632. typedef XCrossingEvent XLeaveWindowEvent;
  633.  
  634. typedef struct {
  635.     int type;        /* FocusIn or FocusOut */
  636.     unsigned long serial;    /* # of last request processed by server */
  637.     Bool send_event;    /* true if this came from a SendEvent request */
  638.     Display *display;    /* Display the event was read from */
  639.     Window window;        /* window of event */
  640.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  641.     int detail;
  642.     /*
  643.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  644.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  645.      * NotifyPointerRoot, NotifyDetailNone 
  646.      */
  647. } XFocusChangeEvent;
  648. typedef XFocusChangeEvent XFocusInEvent;
  649. typedef XFocusChangeEvent XFocusOutEvent;
  650.  
  651. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  652. typedef struct {
  653.     int type;
  654.     unsigned long serial;    /* # of last request processed by server */
  655.     Bool send_event;    /* true if this came from a SendEvent request */
  656.     Display *display;    /* Display the event was read from */
  657.     Window window;
  658.     char key_vector[32];
  659. } XKeymapEvent;    
  660.  
  661. typedef struct {
  662.     int type;
  663.     unsigned long serial;    /* # of last request processed by server */
  664.     Bool send_event;    /* true if this came from a SendEvent request */
  665.     Display *display;    /* Display the event was read from */
  666.     Window window;
  667.     int x, y;
  668.     int width, height;
  669.     int count;        /* if non-zero, at least this many more */
  670. } XExposeEvent;
  671.  
  672. typedef struct {
  673.     int type;
  674.     unsigned long serial;    /* # of last request processed by server */
  675.     Bool send_event;    /* true if this came from a SendEvent request */
  676.     Display *display;    /* Display the event was read from */
  677.     Drawable drawable;
  678.     int x, y;
  679.     int width, height;
  680.     int count;        /* if non-zero, at least this many more */
  681.     int major_code;        /* core is CopyArea or CopyPlane */
  682.     int minor_code;        /* not defined in the core */
  683. } XGraphicsExposeEvent;
  684.  
  685. typedef struct {
  686.     int type;
  687.     unsigned long serial;    /* # of last request processed by server */
  688.     Bool send_event;    /* true if this came from a SendEvent request */
  689.     Display *display;    /* Display the event was read from */
  690.     Drawable drawable;
  691.     int major_code;        /* core is CopyArea or CopyPlane */
  692.     int minor_code;        /* not defined in the core */
  693. } XNoExposeEvent;
  694.  
  695. typedef struct {
  696.     int type;
  697.     unsigned long serial;    /* # of last request processed by server */
  698.     Bool send_event;    /* true if this came from a SendEvent request */
  699.     Display *display;    /* Display the event was read from */
  700.     Window window;
  701.     int state;        /* Visibility state */
  702. } XVisibilityEvent;
  703.  
  704. typedef struct {
  705.     int type;
  706.     unsigned long serial;    /* # of last request processed by server */
  707.     Bool send_event;    /* true if this came from a SendEvent request */
  708.     Display *display;    /* Display the event was read from */
  709.     Window parent;        /* parent of the window */
  710.     Window window;        /* window id of window created */
  711.     int x, y;        /* window location */
  712.     int width, height;    /* size of window */
  713.     int border_width;    /* border width */
  714.     Bool override_redirect;    /* creation should be overridden */
  715. } XCreateWindowEvent;
  716.  
  717. typedef struct {
  718.     int type;
  719.     unsigned long serial;    /* # of last request processed by server */
  720.     Bool send_event;    /* true if this came from a SendEvent request */
  721.     Display *display;    /* Display the event was read from */
  722.     Window event;
  723.     Window window;
  724. } XDestroyWindowEvent;
  725.  
  726. typedef struct {
  727.     int type;
  728.     unsigned long serial;    /* # of last request processed by server */
  729.     Bool send_event;    /* true if this came from a SendEvent request */
  730.     Display *display;    /* Display the event was read from */
  731.     Window event;
  732.     Window window;
  733.     Bool from_configure;
  734. } XUnmapEvent;
  735.  
  736. typedef struct {
  737.     int type;
  738.     unsigned long serial;    /* # of last request processed by server */
  739.     Bool send_event;    /* true if this came from a SendEvent request */
  740.     Display *display;    /* Display the event was read from */
  741.     Window event;
  742.     Window window;
  743.     Bool override_redirect;    /* boolean, is override set... */
  744. } XMapEvent;
  745.  
  746. typedef struct {
  747.     int type;
  748.     unsigned long serial;    /* # of last request processed by server */
  749.     Bool send_event;    /* true if this came from a SendEvent request */
  750.     Display *display;    /* Display the event was read from */
  751.     Window parent;
  752.     Window window;
  753. } XMapRequestEvent;
  754.  
  755. typedef struct {
  756.     int type;
  757.     unsigned long serial;    /* # of last request processed by server */
  758.     Bool send_event;    /* true if this came from a SendEvent request */
  759.     Display *display;    /* Display the event was read from */
  760.     Window event;
  761.     Window window;
  762.     Window parent;
  763.     int x, y;
  764.     Bool override_redirect;
  765. } XReparentEvent;
  766.  
  767. typedef struct {
  768.     int type;
  769.     unsigned long serial;    /* # of last request processed by server */
  770.     Bool send_event;    /* true if this came from a SendEvent request */
  771.     Display *display;    /* Display the event was read from */
  772.     Window event;
  773.     Window window;
  774.     int x, y;
  775.     int width, height;
  776.     int border_width;
  777.     Window above;
  778.     Bool override_redirect;
  779. } XConfigureEvent;
  780.  
  781. typedef struct {
  782.     int type;
  783.     unsigned long serial;    /* # of last request processed by server */
  784.     Bool send_event;    /* true if this came from a SendEvent request */
  785.     Display *display;    /* Display the event was read from */
  786.     Window event;
  787.     Window window;
  788.     int x, y;
  789. } XGravityEvent;
  790.  
  791. typedef struct {
  792.     int type;
  793.     unsigned long serial;    /* # of last request processed by server */
  794.     Bool send_event;    /* true if this came from a SendEvent request */
  795.     Display *display;    /* Display the event was read from */
  796.     Window window;
  797.     int width, height;
  798. } XResizeRequestEvent;
  799.  
  800. typedef struct {
  801.     int type;
  802.     unsigned long serial;    /* # of last request processed by server */
  803.     Bool send_event;    /* true if this came from a SendEvent request */
  804.     Display *display;    /* Display the event was read from */
  805.     Window parent;
  806.     Window window;
  807.     int x, y;
  808.     int width, height;
  809.     int border_width;
  810.     Window above;
  811.     int detail;        /* Above, Below, TopIf, BottomIf, Opposite */
  812.     unsigned long value_mask;
  813. } XConfigureRequestEvent;
  814.  
  815. typedef struct {
  816.     int type;
  817.     unsigned long serial;    /* # of last request processed by server */
  818.     Bool send_event;    /* true if this came from a SendEvent request */
  819.     Display *display;    /* Display the event was read from */
  820.     Window event;
  821.     Window window;
  822.     int place;        /* PlaceOnTop, PlaceOnBottom */
  823. } XCirculateEvent;
  824.  
  825. typedef struct {
  826.     int type;
  827.     unsigned long serial;    /* # of last request processed by server */
  828.     Bool send_event;    /* true if this came from a SendEvent request */
  829.     Display *display;    /* Display the event was read from */
  830.     Window parent;
  831.     Window window;
  832.     int place;        /* PlaceOnTop, PlaceOnBottom */
  833. } XCirculateRequestEvent;
  834.  
  835. typedef struct {
  836.     int type;
  837.     unsigned long serial;    /* # of last request processed by server */
  838.     Bool send_event;    /* true if this came from a SendEvent request */
  839.     Display *display;    /* Display the event was read from */
  840.     Window window;
  841.     Atom atom;
  842.     Time time;
  843.     int state;        /* NewValue, Deleted */
  844. } XPropertyEvent;
  845.  
  846. typedef struct {
  847.     int type;
  848.     unsigned long serial;    /* # of last request processed by server */
  849.     Bool send_event;    /* true if this came from a SendEvent request */
  850.     Display *display;    /* Display the event was read from */
  851.     Window window;
  852.     Atom selection;
  853.     Time time;
  854. } XSelectionClearEvent;
  855.  
  856. typedef struct {
  857.     int type;
  858.     unsigned long serial;    /* # of last request processed by server */
  859.     Bool send_event;    /* true if this came from a SendEvent request */
  860.     Display *display;    /* Display the event was read from */
  861.     Window owner;
  862.     Window requestor;
  863.     Atom selection;
  864.     Atom target;
  865.     Atom property;
  866.     Time time;
  867. } XSelectionRequestEvent;
  868.  
  869. typedef struct {
  870.     int type;
  871.     unsigned long serial;    /* # of last request processed by server */
  872.     Bool send_event;    /* true if this came from a SendEvent request */
  873.     Display *display;    /* Display the event was read from */
  874.     Window requestor;
  875.     Atom selection;
  876.     Atom target;
  877.     Atom property;        /* ATOM or None */
  878.     Time time;
  879. } XSelectionEvent;
  880.  
  881. typedef struct {
  882.     int type;
  883.     unsigned long serial;    /* # of last request processed by server */
  884.     Bool send_event;    /* true if this came from a SendEvent request */
  885.     Display *display;    /* Display the event was read from */
  886.     Window window;
  887.     Colormap colormap;    /* COLORMAP or None */
  888. #if defined(__cplusplus) || defined(c_plusplus)
  889.     Bool c_new;        /* C++ */
  890. #else
  891.     Bool new;
  892. #endif
  893.     int state;        /* ColormapInstalled, ColormapUninstalled */
  894. } XColormapEvent;
  895.  
  896. typedef struct {
  897.     int type;
  898.     unsigned long serial;    /* # of last request processed by server */
  899.     Bool send_event;    /* true if this came from a SendEvent request */
  900.     Display *display;    /* Display the event was read from */
  901.     Window window;
  902.     Atom message_type;
  903.     int format;
  904.     union {
  905.         char b[20];
  906.         short s[10];
  907.         long l[5];
  908.         } data;
  909. } XClientMessageEvent;
  910.  
  911. typedef struct {
  912.     int type;
  913.     unsigned long serial;    /* # of last request processed by server */
  914.     Bool send_event;    /* true if this came from a SendEvent request */
  915.     Display *display;    /* Display the event was read from */
  916.     Window window;        /* unused */
  917.     int request;        /* one of MappingModifier, MappingKeyboard,
  918.                    MappingPointer */
  919.     int first_keycode;    /* first keycode */
  920.     int count;        /* defines range of change w. first_keycode*/
  921. } XMappingEvent;
  922.  
  923. typedef struct {
  924.     int type;
  925.     Display *display;    /* Display the event was read from */
  926.     XID resourceid;        /* resource id */
  927.     unsigned long serial;    /* serial number of failed request */
  928.     unsigned char error_code;    /* error code of failed request */
  929.     unsigned char request_code;    /* Major op-code of failed request */
  930.     unsigned char minor_code;    /* Minor op-code of failed request */
  931. } XErrorEvent;
  932.  
  933. typedef struct {
  934.     int type;
  935.     unsigned long serial;    /* # of last request processed by server */
  936.     Bool send_event;    /* true if this came from a SendEvent request */
  937.     Display *display;/* Display the event was read from */
  938.     Window window;    /* window on which event was requested in event mask */
  939. } XAnyEvent;
  940.  
  941. /*
  942.  * this union is defined so Xlib can always use the same sized
  943.  * event structure internally, to avoid memory fragmentation.
  944.  */
  945. typedef union _XEvent {
  946.         int type;        /* must not be changed; first element */
  947.     XAnyEvent xany;
  948.     XKeyEvent xkey;
  949.     XButtonEvent xbutton;
  950.     XMotionEvent xmotion;
  951.     XCrossingEvent xcrossing;
  952.     XFocusChangeEvent xfocus;
  953.     XExposeEvent xexpose;
  954.     XGraphicsExposeEvent xgraphicsexpose;
  955.     XNoExposeEvent xnoexpose;
  956.     XVisibilityEvent xvisibility;
  957.     XCreateWindowEvent xcreatewindow;
  958.     XDestroyWindowEvent xdestroywindow;
  959.     XUnmapEvent xunmap;
  960.     XMapEvent xmap;
  961.     XMapRequestEvent xmaprequest;
  962.     XReparentEvent xreparent;
  963.     XConfigureEvent xconfigure;
  964.     XGravityEvent xgravity;
  965.     XResizeRequestEvent xresizerequest;
  966.     XConfigureRequestEvent xconfigurerequest;
  967.     XCirculateEvent xcirculate;
  968.     XCirculateRequestEvent xcirculaterequest;
  969.     XPropertyEvent xproperty;
  970.     XSelectionClearEvent xselectionclear;
  971.     XSelectionRequestEvent xselectionrequest;
  972.     XSelectionEvent xselection;
  973.     XColormapEvent xcolormap;
  974.     XClientMessageEvent xclient;
  975.     XMappingEvent xmapping;
  976.     XErrorEvent xerror;
  977.     XKeymapEvent xkeymap;
  978.     long pad[24];
  979. } XEvent;
  980. #endif
  981.  
  982. #define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
  983.  
  984. /*
  985.  * per character font metric information.
  986.  */
  987. typedef struct {
  988.     short    lbearing;    /* origin to left edge of raster */
  989.     short    rbearing;    /* origin to right edge of raster */
  990.     short    width;        /* advance to next char's origin */
  991.     short    ascent;        /* baseline to top edge of raster */
  992.     short    descent;    /* baseline to bottom edge of raster */
  993.     unsigned short attributes;    /* per char flags (not predefined) */
  994. } XCharStruct;
  995.  
  996. /*
  997.  * To allow arbitrary information with fonts, there are additional properties
  998.  * returned.
  999.  */
  1000. typedef struct {
  1001.     Atom name;
  1002.     unsigned long card32;
  1003. } XFontProp;
  1004.  
  1005. typedef struct {
  1006.     XExtData    *ext_data;    /* hook for extension to hang data */
  1007.     Font        fid;            /* Font id for this font */
  1008.     unsigned    direction;    /* hint about direction the font is painted */
  1009.     unsigned    min_char_or_byte2;/* first character */
  1010.     unsigned    max_char_or_byte2;/* last character */
  1011.     unsigned    min_byte1;    /* first row that exists */
  1012.     unsigned    max_byte1;    /* last row that exists */
  1013.     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
  1014.     unsigned    default_char;    /* char to print for undefined character */
  1015.     int         n_properties;   /* how many properties there are */
  1016.     XFontProp    *properties;    /* pointer to array of additional properties*/
  1017.     XCharStruct    min_bounds;    /* minimum bounds over all existing char*/
  1018.     XCharStruct    max_bounds;    /* maximum bounds over all existing char*/
  1019.     XCharStruct    *per_char;    /* first_char to last_char information */
  1020.     int        ascent;        /* log. extent above baseline for spacing */
  1021.     int        descent;    /* log. descent below baseline for spacing */
  1022. } XFontStruct;
  1023.  
  1024. /*
  1025.  * PolyText routines take these as arguments.
  1026.  */
  1027. typedef struct {
  1028.     char *chars;        /* pointer to string */
  1029.     int nchars;            /* number of characters */
  1030.     int delta;            /* delta between strings */
  1031.     Font font;            /* font to print it in, None don't change */
  1032. } XTextItem;
  1033.  
  1034. typedef struct {        /* normal 16 bit characters are two bytes */
  1035.     unsigned char byte1;
  1036.     unsigned char byte2;
  1037. } XChar2b;
  1038.  
  1039. typedef struct {
  1040.     XChar2b *chars;        /* two byte characters */
  1041.     int nchars;            /* number of characters */
  1042.     int delta;            /* delta between strings */
  1043.     Font font;            /* font to print it in, None don't change */
  1044. } XTextItem16;
  1045.  
  1046.  
  1047. typedef union { Display *display;
  1048.         GC gc;
  1049.         Visual *visual;
  1050.         Screen *screen;
  1051.         ScreenFormat *pixmap_format;
  1052.         XFontStruct *font; } XEDataObject;
  1053.  
  1054. typedef struct {
  1055.     XRectangle      max_ink_extent;
  1056.     XRectangle      max_logical_extent;
  1057. } XFontSetExtents;
  1058.  
  1059. typedef struct _XFontSet *XFontSet;
  1060.  
  1061. typedef struct {
  1062.     char           *chars;
  1063.     int             nchars;
  1064.     int             delta;
  1065.     XFontSet        font_set;
  1066. } XmbTextItem;
  1067.  
  1068. typedef struct {
  1069.     wchar_t        *chars;
  1070.     int             nchars;
  1071.     int             delta;
  1072.     XFontSet        font_set;
  1073. } XwcTextItem;
  1074.  
  1075. typedef void (*XIMProc)();
  1076.  
  1077. typedef struct _XIM *XIM;
  1078. typedef struct _XIC *XIC;
  1079.  
  1080. typedef unsigned long XIMStyle;
  1081.  
  1082. typedef struct {
  1083.     unsigned short count_styles;
  1084.     XIMStyle *supported_styles;
  1085. } XIMStyles;
  1086.  
  1087. #define XIMPreeditArea        0x0001L
  1088. #define XIMPreeditCallbacks    0x0002L
  1089. #define XIMPreeditPosition    0x0004L
  1090. #define XIMPreeditNothing    0x0008L
  1091. #define XIMPreeditNone        0x0010L
  1092. #define XIMStatusArea        0x0100L
  1093. #define XIMStatusCallbacks    0x0200L
  1094. #define XIMStatusNothing    0x0400L
  1095. #define XIMStatusNone        0x0800L
  1096.  
  1097. #define XNVaNestedList "XNVaNestedList"
  1098. #define XNQueryInputStyle "queryInputStyle"
  1099. #define XNClientWindow "clientWindow"
  1100. #define XNInputStyle "inputStyle"
  1101. #define XNFocusWindow "focusWindow"
  1102. #define XNResourceName "resourceName"
  1103. #define XNResourceClass "resourceClass"
  1104. #define XNGeometryCallback "geometryCallback"
  1105. #define XNFilterEvents "filterEvents"
  1106. #define XNPreeditStartCallback "preeditStartCallback"
  1107. #define XNPreeditDoneCallback "preeditDoneCallback"
  1108. #define XNPreeditDrawCallback "preeditDrawCallback"
  1109. #define XNPreeditCaretCallback "preeditCaretCallback"
  1110. #define XNPreeditAttributes "preeditAttributes"
  1111. #define XNStatusStartCallback "statusStartCallback"
  1112. #define XNStatusDoneCallback "statusDoneCallback"
  1113. #define XNStatusDrawCallback "statusDrawCallback"
  1114. #define XNStatusAttributes "statusAttributes"
  1115. #define XNArea "area"
  1116. #define XNAreaNeeded "areaNeeded"
  1117. #define XNSpotLocation "spotLocation"
  1118. #define XNColormap "colorMap"
  1119. #define XNStdColormap "stdColorMap"
  1120. #define XNForeground "foreground"
  1121. #define XNBackground "background"
  1122. #define XNBackgroundPixmap "backgroundPixmap"
  1123. #define XNFontSet "fontSet"
  1124. #define XNLineSpace "lineSpace"
  1125. #define XNCursor "cursor"
  1126.  
  1127. #define XBufferOverflow        -1
  1128. #define XLookupNone        1
  1129. #define XLookupChars        2
  1130. #define XLookupKeySym        3
  1131. #define XLookupBoth        4
  1132.  
  1133. #if NeedFunctionPrototypes
  1134. typedef void *XVaNestedList;
  1135. #else
  1136. typedef XPointer XVaNestedList;
  1137. #endif
  1138.  
  1139. typedef struct {
  1140.     XPointer client_data;
  1141.     XIMProc callback;
  1142. } XIMCallback;
  1143.  
  1144. typedef unsigned long XIMFeedback;
  1145.  
  1146. #define XIMReverse    1
  1147. #define XIMUnderline    (1<<1) 
  1148. #define XIMHighlight    (1<<2)
  1149. #define XIMPrimary     (1<<5)
  1150. #define XIMSecondary    (1<<6)
  1151. #define XIMTertiary     (1<<7)
  1152.  
  1153. typedef struct _XIMText {
  1154.     unsigned short length;
  1155.     XIMFeedback *feedback;
  1156.     Bool encoding_is_wchar; 
  1157.     union {
  1158.     char *multi_byte;
  1159.     wchar_t *wide_char;
  1160.     } string; 
  1161. } XIMText;
  1162.  
  1163. typedef struct _XIMPreeditDrawCallbackStruct {
  1164.     int caret;        /* Cursor offset within pre-edit string */
  1165.     int chg_first;    /* Starting change position */
  1166.     int chg_length;    /* Length of the change in character count */
  1167.     XIMText *text;
  1168. } XIMPreeditDrawCallbackStruct;
  1169.  
  1170. typedef enum {
  1171.     XIMForwardChar, XIMBackwardChar,
  1172.     XIMForwardWord, XIMBackwardWord,
  1173.     XIMCaretUp, XIMCaretDown,
  1174.     XIMNextLine, XIMPreviousLine,
  1175.     XIMLineStart, XIMLineEnd, 
  1176.     XIMAbsolutePosition,
  1177.     XIMDontChange
  1178. } XIMCaretDirection;
  1179.  
  1180. typedef enum {
  1181.     XIMIsInvisible,    /* Disable caret feedback */ 
  1182.     XIMIsPrimary,    /* UI defined caret feedback */
  1183.     XIMIsSecondary    /* UI defined caret feedback */
  1184. } XIMCaretStyle;
  1185.  
  1186. typedef struct _XIMPreeditCaretCallbackStruct {
  1187.     int position;         /* Caret offset within pre-edit string */
  1188.     XIMCaretDirection direction; /* Caret moves direction */
  1189.     XIMCaretStyle style;     /* Feedback of the caret */
  1190. } XIMPreeditCaretCallbackStruct;
  1191.  
  1192. typedef enum {
  1193.     XIMTextType,
  1194.     XIMBitmapType
  1195. } XIMStatusDataType;
  1196.     
  1197. typedef struct _XIMStatusDrawCallbackStruct {
  1198.     XIMStatusDataType type;
  1199.     union {
  1200.     XIMText *text;
  1201.     Pixmap  bitmap;
  1202.     } data;
  1203. } XIMStatusDrawCallbackStruct;
  1204.  
  1205. _XFUNCPROTOBEGIN
  1206.  
  1207. #ifndef MAKELIBRARY
  1208.  
  1209. extern XFontStruct *XLoadQueryFont(
  1210. #if NeedFunctionPrototypes
  1211.     Display*        /* display */,
  1212.     char*    /* name */
  1213. #endif
  1214. );
  1215.  
  1216. extern XFontStruct *XQueryFont(
  1217. #if NeedFunctionPrototypes
  1218.     Display*        /* display */,
  1219.     XID            /* font_ID */
  1220. #endif
  1221. );
  1222.  
  1223.  
  1224. extern XTimeCoord *XGetMotionEvents(
  1225. #if NeedFunctionPrototypes
  1226.     Display*        /* display */,
  1227.     Window        /* w */,
  1228.     Time        /* start */,
  1229.     Time        /* stop */,
  1230.     int*        /* nevents_return */
  1231. #endif
  1232. );
  1233.  
  1234. extern XModifierKeymap *XDeleteModifiermapEntry(
  1235. #if NeedFunctionPrototypes
  1236.     XModifierKeymap*    /* modmap */,
  1237. #if NeedWidePrototypes
  1238.     unsigned int    /* keycode_entry */,
  1239. #else
  1240.     KeyCode        /* keycode_entry */,
  1241. #endif
  1242.     int            /* modifier */
  1243. #endif
  1244. );
  1245.  
  1246. extern XModifierKeymap    *XGetModifierMapping(
  1247. #if NeedFunctionPrototypes
  1248.     Display*        /* display */
  1249. #endif
  1250. );
  1251.  
  1252. extern XModifierKeymap    *XInsertModifiermapEntry(
  1253. #if NeedFunctionPrototypes
  1254.     XModifierKeymap*    /* modmap */,
  1255. #if NeedWidePrototypes
  1256.     unsigned int    /* keycode_entry */,
  1257. #else
  1258.     KeyCode        /* keycode_entry */,
  1259. #endif
  1260.     int            /* modifier */    
  1261. #endif
  1262. );
  1263.  
  1264. extern XModifierKeymap *XNewModifiermap(
  1265. #if NeedFunctionPrototypes
  1266.     int            /* max_keys_per_mod */
  1267. #endif
  1268. );
  1269.  
  1270. extern XImage *XCreateImage(
  1271. #if NeedFunctionPrototypes
  1272.     Display*        /* display */,
  1273.     Visual*        /* visual */,
  1274.     unsigned int    /* depth */,
  1275.     int            /* format */,
  1276.     int            /* offset */,
  1277.     char*        /* data */,
  1278.     unsigned int    /* width */,
  1279.     unsigned int    /* height */,
  1280.     int            /* bitmap_pad */,
  1281.     int            /* bytes_per_line */
  1282. #endif
  1283. );
  1284. extern XImage *XGetImage(
  1285. #if NeedFunctionPrototypes
  1286.     Display*        /* display */,
  1287.     Drawable        /* d */,
  1288.     int            /* x */,
  1289.     int            /* y */,
  1290.     unsigned int    /* width */,
  1291.     unsigned int    /* height */,
  1292.     unsigned long    /* plane_mask */,
  1293.     int            /* format */
  1294. #endif
  1295. );
  1296. extern XImage *XGetSubImage(
  1297. #if NeedFunctionPrototypes
  1298.     Display*        /* display */,
  1299.     Drawable        /* d */,
  1300.     int            /* x */,
  1301.     int            /* y */,
  1302.     unsigned int    /* width */,
  1303.     unsigned int    /* height */,
  1304.     unsigned long    /* plane_mask */,
  1305.     int            /* format */,
  1306.     XImage*        /* dest_image */,
  1307.     int            /* dest_x */,
  1308.     int            /* dest_y */
  1309. #endif
  1310. );
  1311.  
  1312. /* 
  1313.  * X function declarations.
  1314.  */
  1315. extern Display *XOpenDisplay(
  1316. #if NeedFunctionPrototypes
  1317.     char*    /* display_name */
  1318. #endif
  1319. );
  1320.  
  1321. extern void XrmInitialize(
  1322. #if NeedFunctionPrototypes
  1323.     void
  1324. #endif
  1325. );
  1326.  
  1327. extern char *XFetchBytes(
  1328. #if NeedFunctionPrototypes
  1329.     Display*        /* display */,
  1330.     int*        /* nbytes_return */
  1331. #endif
  1332. );
  1333. extern char *XFetchBuffer(
  1334. #if NeedFunctionPrototypes
  1335.     Display*        /* display */,
  1336.     int*        /* nbytes_return */,
  1337.     int            /* buffer */
  1338. #endif
  1339. );
  1340. extern char *XGetAtomName(
  1341. #if NeedFunctionPrototypes
  1342.     Display*        /* display */,
  1343.     Atom        /* atom */
  1344. #endif
  1345. );
  1346. extern char *XGetDefault(
  1347. #if NeedFunctionPrototypes
  1348.     Display*        /* display */,
  1349.      char*    /* program */,
  1350.      char*    /* option */          
  1351. #endif
  1352. );
  1353. extern char *XDisplayName(
  1354. #if NeedFunctionPrototypes
  1355.      char*    /* string */
  1356. #endif
  1357. );
  1358. extern char *XKeysymToString(
  1359. #if NeedFunctionPrototypes
  1360.     KeySym        /* keysym */
  1361. #endif
  1362. );
  1363.  
  1364. extern int (*XSynchronize(
  1365. #if NeedFunctionPrototypes
  1366.     Display*        /* display */,
  1367.     Bool        /* onoff */
  1368. #endif
  1369. ))();
  1370. extern int (*XSetAfterFunction(
  1371. #if NeedFunctionPrototypes
  1372.     Display*        /* display */,
  1373.     int (*) (
  1374. #if NeedNestedPrototypes
  1375.          Display*    /* display */
  1376. #endif
  1377.             )        /* procedure */
  1378. #endif
  1379. ))();
  1380. extern Atom XInternAtom(
  1381. #if NeedFunctionPrototypes
  1382.     Display*        /* display */,
  1383.      char*    /* atom_name */,
  1384.     Bool        /* only_if_exists */         
  1385. #endif
  1386. );
  1387. extern Colormap XCopyColormapAndFree(
  1388. #if NeedFunctionPrototypes
  1389.     Display*        /* display */,
  1390.     Colormap        /* colormap */
  1391. #endif
  1392. );
  1393. extern Colormap XCreateColormap(
  1394. #if NeedFunctionPrototypes
  1395.     Display*        /* display */,
  1396.     Window        /* w */,
  1397.     Visual*        /* visual */,
  1398.     int            /* alloc */             
  1399. #endif
  1400. );
  1401. extern Cursor XCreatePixmapCursor(
  1402. #if NeedFunctionPrototypes
  1403.     Display*        /* display */,
  1404.     Pixmap        /* source */,
  1405.     Pixmap        /* mask */,
  1406.     XColor*        /* foreground_color */,
  1407.     XColor*        /* background_color */,
  1408.     unsigned int    /* x */,
  1409.     unsigned int    /* y */               
  1410. #endif
  1411. );
  1412. extern Cursor XCreateGlyphCursor(
  1413. #if NeedFunctionPrototypes
  1414.     Display*        /* display */,
  1415.     Font        /* source_font */,
  1416.     Font        /* mask_font */,
  1417.     unsigned int    /* source_char */,
  1418.     unsigned int    /* mask_char */,
  1419.     XColor*        /* foreground_color */,
  1420.     XColor*        /* background_color */
  1421. #endif
  1422. );
  1423. extern Cursor XCreateFontCursor(
  1424. #if NeedFunctionPrototypes
  1425.     Display*        /* display */,
  1426.     unsigned int    /* shape */
  1427. #endif
  1428. );
  1429. extern Font XLoadFont(
  1430. #if NeedFunctionPrototypes
  1431.     Display*        /* display */,
  1432.     char*    /* name */
  1433. #endif
  1434. );
  1435. extern GC XCreateGC(
  1436. #if NeedFunctionPrototypes
  1437.     Display*        /* display */,
  1438.     Drawable        /* d */,
  1439.     unsigned long    /* valuemask */,
  1440.     XGCValues*        /* values */
  1441. #endif
  1442. );
  1443. extern GContext XGContextFromGC(
  1444. #if NeedFunctionPrototypes
  1445.     GC            /* gc */
  1446. #endif
  1447. );
  1448. extern void XFlushGC(
  1449. #if NeedFunctionPrototypes
  1450.     Display*        /* display */,
  1451.     GC            /* gc */
  1452. #endif
  1453. );
  1454. extern Pixmap XCreatePixmap(
  1455. #if NeedFunctionPrototypes
  1456.     Display*        /* display */,
  1457.     Drawable        /* d */,
  1458.     unsigned int    /* width */,
  1459.     unsigned int    /* height */,
  1460.     unsigned int    /* depth */                
  1461. #endif
  1462. );
  1463. extern Pixmap XCreateBitmapFromData(
  1464. #if NeedFunctionPrototypes
  1465.     Display*        /* display */,
  1466.     Drawable        /* d */,
  1467.     char*    /* data */,
  1468.     unsigned int    /* width */,
  1469.     unsigned int    /* height */
  1470. #endif
  1471. );
  1472. extern Pixmap XCreatePixmapFromBitmapData(
  1473. #if NeedFunctionPrototypes
  1474.     Display*        /* display */,
  1475.     Drawable        /* d */,
  1476.     char*        /* data */,
  1477.     unsigned int    /* width */,
  1478.     unsigned int    /* height */,
  1479.     unsigned long    /* fg */,
  1480.     unsigned long    /* bg */,
  1481.     unsigned int    /* depth */
  1482. #endif
  1483. );
  1484. extern Window XCreateSimpleWindow(
  1485. #if NeedFunctionPrototypes
  1486.     Display*        /* display */,
  1487.     Window        /* parent */,
  1488.     int            /* x */,
  1489.     int            /* y */,
  1490.     unsigned int    /* width */,
  1491.     unsigned int    /* height */,
  1492.     unsigned int    /* border_width */,
  1493.     unsigned long    /* border */,
  1494.     unsigned long    /* background */
  1495. #endif
  1496. );
  1497. extern Window XGetSelectionOwner(
  1498. #if NeedFunctionPrototypes
  1499.     Display*        /* display */,
  1500.     Atom        /* selection */
  1501. #endif
  1502. );
  1503. extern Window XCreateWindow(
  1504. #if NeedFunctionPrototypes
  1505.     Display*        /* display */,
  1506.     Window        /* parent */,
  1507.     int            /* x */,
  1508.     int            /* y */,
  1509.     unsigned int    /* width */,
  1510.     unsigned int    /* height */,
  1511.     unsigned int    /* border_width */,
  1512.     int            /* depth */,
  1513.     unsigned int    /* class */,
  1514.     Visual*        /* visual */,
  1515.     unsigned long    /* valuemask */,
  1516.     XSetWindowAttributes*    /* attributes */
  1517. #endif
  1518. ); 
  1519. extern Colormap *XListInstalledColormaps(
  1520. #if NeedFunctionPrototypes
  1521.     Display*        /* display */,
  1522.     Window        /* w */,
  1523.     int*        /* num_return */
  1524. #endif
  1525. );
  1526. extern char **XListFonts(
  1527. #if NeedFunctionPrototypes
  1528.     Display*        /* display */,
  1529.      char*    /* pattern */,
  1530.     int            /* maxnames */,
  1531.     int*        /* actual_count_return */
  1532. #endif
  1533. );
  1534. extern char **XListFontsWithInfo(
  1535. #if NeedFunctionPrototypes
  1536.     Display*        /* display */,
  1537.      char*    /* pattern */,
  1538.     int            /* maxnames */,
  1539.     int*        /* count_return */,
  1540.     XFontStruct**    /* info_return */
  1541. #endif
  1542. );
  1543. extern char **XGetFontPath(
  1544. #if NeedFunctionPrototypes
  1545.     Display*        /* display */,
  1546.     int*        /* npaths_return */
  1547. #endif
  1548. );
  1549. extern char **XListExtensions(
  1550. #if NeedFunctionPrototypes
  1551.     Display*        /* display */,
  1552.     int*        /* nextensions_return */
  1553. #endif
  1554. );
  1555. extern Atom *XListProperties(
  1556. #if NeedFunctionPrototypes
  1557.     Display*        /* display */,
  1558.     Window        /* w */,
  1559.     int*        /* num_prop_return */
  1560. #endif
  1561. );
  1562. extern XHostAddress *XListHosts(
  1563. #if NeedFunctionPrototypes
  1564.     Display*        /* display */,
  1565.     int*        /* nhosts_return */,
  1566.     Bool*        /* state_return */
  1567. #endif
  1568. );
  1569. extern KeySym XKeycodeToKeysym(
  1570. #if NeedFunctionPrototypes
  1571.     Display*        /* display */,
  1572. #if NeedWidePrototypes
  1573.     unsigned int    /* keycode */,
  1574. #else
  1575.     KeyCode        /* keycode */,
  1576. #endif
  1577.     int            /* index */
  1578. #endif
  1579. );
  1580. extern KeySym XLookupKeysym(
  1581. #if NeedFunctionPrototypes
  1582.     XKeyEvent*        /* key_event */,
  1583.     int            /* index */
  1584. #endif
  1585. );
  1586. extern KeySym *XGetKeyboardMapping(
  1587. #if NeedFunctionPrototypes
  1588.     Display*        /* display */,
  1589. #if NeedWidePrototypes
  1590.     unsigned int    /* first_keycode */,
  1591. #else
  1592.     KeyCode        /* first_keycode */,
  1593. #endif
  1594.     int            /* keycode_count */,
  1595.     int*        /* keysyms_per_keycode_return */
  1596. #endif
  1597. );
  1598. extern KeySym XStringToKeysym(
  1599. #if NeedFunctionPrototypes
  1600.      char*    /* string */
  1601. #endif
  1602. );
  1603. extern long XMaxRequestSize(
  1604. #if NeedFunctionPrototypes
  1605.     Display*        /* display */
  1606. #endif
  1607. );
  1608. extern char *XResourceManagerString(
  1609. #if NeedFunctionPrototypes
  1610.     Display*        /* display */
  1611. #endif
  1612. );
  1613. extern char *XScreenResourceString(
  1614. #if NeedFunctionPrototypes
  1615.     Screen*        /* screen */
  1616. #endif
  1617. );
  1618. extern unsigned long XDisplayMotionBufferSize(
  1619. #if NeedFunctionPrototypes
  1620.     Display*        /* display */
  1621. #endif
  1622. );
  1623. extern VisualID XVisualIDFromVisual(
  1624. #if NeedFunctionPrototypes
  1625.     Visual*        /* visual */
  1626. #endif
  1627. );
  1628.  
  1629. /* routines for dealing with extensions */
  1630.  
  1631. extern XExtCodes *XInitExtension(
  1632. #if NeedFunctionPrototypes
  1633.     Display*        /* display */,
  1634.      char*    /* name */
  1635. #endif
  1636. );
  1637.  
  1638. extern XExtCodes *XAddExtension(
  1639. #if NeedFunctionPrototypes
  1640.     Display*        /* display */
  1641. #endif
  1642. );
  1643. extern XExtData *XFindOnExtensionList(
  1644. #if NeedFunctionPrototypes
  1645.     XExtData**        /* structure */,
  1646.     int            /* number */
  1647. #endif
  1648. );
  1649. extern XExtData **XEHeadOfExtensionList(
  1650. #if NeedFunctionPrototypes
  1651.     XEDataObject    /* object */
  1652. #endif
  1653. );
  1654.  
  1655. /* these are routines for which there are also macros */
  1656. extern Window XRootWindow(
  1657. #if NeedFunctionPrototypes
  1658.     Display*        /* display */,
  1659.     int            /* screen_number */
  1660. #endif
  1661. );
  1662. extern Window XDefaultRootWindow(
  1663. #if NeedFunctionPrototypes
  1664.     Display*        /* display */
  1665. #endif
  1666. );
  1667. extern Window XRootWindowOfScreen(
  1668. #if NeedFunctionPrototypes
  1669.     Screen*        /* screen */
  1670. #endif
  1671. );
  1672. extern Visual *XDefaultVisual(
  1673. #if NeedFunctionPrototypes
  1674.     Display*        /* display */,
  1675.     int            /* screen_number */
  1676. #endif
  1677. );
  1678. extern Visual *XDefaultVisualOfScreen(
  1679. #if NeedFunctionPrototypes
  1680.     Screen*        /* screen */
  1681. #endif
  1682. );
  1683. extern GC XDefaultGC(
  1684. #if NeedFunctionPrototypes
  1685.     Display*        /* display */,
  1686.     int            /* screen_number */
  1687. #endif
  1688. );
  1689. extern GC XDefaultGCOfScreen(
  1690. #if NeedFunctionPrototypes
  1691.     Screen*        /* screen */
  1692. #endif
  1693. );
  1694. extern unsigned long XBlackPixel(
  1695. #if NeedFunctionPrototypes
  1696.     Display*        /* display */,
  1697.     int            /* screen_number */
  1698. #endif
  1699. );
  1700. extern unsigned long XWhitePixel(
  1701. #if NeedFunctionPrototypes
  1702.     Display*        /* display */,
  1703.     int            /* screen_number */
  1704. #endif
  1705. );
  1706. extern unsigned long XAllPlanes(
  1707. #if NeedFunctionPrototypes
  1708.     void
  1709. #endif
  1710. );
  1711. extern unsigned long XBlackPixelOfScreen(
  1712. #if NeedFunctionPrototypes
  1713.     Screen*        /* screen */
  1714. #endif
  1715. );
  1716. extern unsigned long XWhitePixelOfScreen(
  1717. #if NeedFunctionPrototypes
  1718.     Screen*        /* screen */
  1719. #endif
  1720. );
  1721. extern unsigned long XNextRequest(
  1722. #if NeedFunctionPrototypes
  1723.     Display*        /* display */
  1724. #endif
  1725. );
  1726. extern unsigned long XLastKnownRequestProcessed(
  1727. #if NeedFunctionPrototypes
  1728.     Display*        /* display */
  1729. #endif
  1730. );
  1731. extern char *XServerVendor(
  1732. #if NeedFunctionPrototypes
  1733.     Display*        /* display */
  1734. #endif
  1735. );
  1736. extern char *XDisplayString(
  1737. #if NeedFunctionPrototypes
  1738.     Display*        /* display */
  1739. #endif
  1740. );
  1741. extern Colormap XDefaultColormap(
  1742. #if NeedFunctionPrototypes
  1743.     Display*        /* display */,
  1744.     int            /* screen_number */
  1745. #endif
  1746. );
  1747. extern Colormap XDefaultColormapOfScreen(
  1748. #if NeedFunctionPrototypes
  1749.     Screen*        /* screen */
  1750. #endif
  1751. );
  1752. extern Display *XDisplayOfScreen(
  1753. #if NeedFunctionPrototypes
  1754.     Screen*        /* screen */
  1755. #endif
  1756. );
  1757. extern Screen *XScreenOfDisplay(
  1758. #if NeedFunctionPrototypes
  1759.     Display*        /* display */,
  1760.     int            /* screen_number */
  1761. #endif
  1762. );
  1763. extern Screen *XDefaultScreenOfDisplay(
  1764. #if NeedFunctionPrototypes
  1765.     Display*        /* display */
  1766. #endif
  1767. );
  1768. extern long XEventMaskOfScreen(
  1769. #if NeedFunctionPrototypes
  1770.     Screen*        /* screen */
  1771. #endif
  1772. );
  1773.  
  1774. extern int XScreenNumberOfScreen(
  1775. #if NeedFunctionPrototypes
  1776.     Screen*        /* screen */
  1777. #endif
  1778. );
  1779.  
  1780. typedef int (*XErrorHandler) (        /* WARNING, this type not in Xlib spec */
  1781. #if NeedFunctionPrototypes
  1782.     Display*        /* display */,
  1783.     XErrorEvent*    /* error_event */
  1784. #endif
  1785. );
  1786.  
  1787. extern XErrorHandler XSetErrorHandler (
  1788. #if NeedFunctionPrototypes
  1789.     XErrorHandler    /* handler */
  1790. #endif
  1791. );
  1792.  
  1793.  
  1794. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  1795. #if NeedFunctionPrototypes
  1796.     Display*        /* display */
  1797. #endif
  1798. );
  1799.  
  1800. extern XIOErrorHandler XSetIOErrorHandler (
  1801. #if NeedFunctionPrototypes
  1802.     XIOErrorHandler    /* handler */
  1803. #endif
  1804. );
  1805.  
  1806.  
  1807. extern XPixmapFormatValues *XListPixmapFormats(
  1808. #if NeedFunctionPrototypes
  1809.     Display*        /* display */,
  1810.     int*        /* count_return */
  1811. #endif
  1812. );
  1813. extern int *XListDepths(
  1814. #if NeedFunctionPrototypes
  1815.     Display*        /* display */,
  1816.     int            /* screen_number */,
  1817.     int*        /* count_return */
  1818. #endif
  1819. );
  1820.  
  1821. /* ICCCM routines for things that don't require special include files; */
  1822. /* other declarations are given in Xutil.h                             */
  1823. extern Status XReconfigureWMWindow(
  1824. #if NeedFunctionPrototypes
  1825.     Display*        /* display */,
  1826.     Window        /* w */,
  1827.     int            /* screen_number */,
  1828.     unsigned int    /* mask */,
  1829.     XWindowChanges*    /* changes */
  1830. #endif
  1831. );
  1832.  
  1833. extern Status XGetWMProtocols(
  1834. #if NeedFunctionPrototypes
  1835.     Display*        /* display */,
  1836.     Window        /* w */,
  1837.     Atom**        /* protocols_return */,
  1838.     int*        /* count_return */
  1839. #endif
  1840. );
  1841. extern Status XSetWMProtocols(
  1842. #if NeedFunctionPrototypes
  1843.     Display*        /* display */,
  1844.     Window        /* w */,
  1845.     Atom*        /* protocols */,
  1846.     int            /* count */
  1847. #endif
  1848. );
  1849. extern Status XIconifyWindow(
  1850. #if NeedFunctionPrototypes
  1851.     Display*        /* display */,
  1852.     Window        /* w */,
  1853.     int            /* screen_number */
  1854. #endif
  1855. );
  1856. extern Status XWithdrawWindow(
  1857. #if NeedFunctionPrototypes
  1858.     Display*        /* display */,
  1859.     Window        /* w */,
  1860.     int            /* screen_number */
  1861. #endif
  1862. );
  1863. extern Status XGetCommand(
  1864. #if NeedFunctionPrototypes
  1865.     Display*        /* display */,
  1866.     Window        /* w */,
  1867.     char***        /* argv_return */,
  1868.     int*        /* argc_return */
  1869. #endif
  1870. );
  1871. extern Status XGetWMColormapWindows(
  1872. #if NeedFunctionPrototypes
  1873.     Display*        /* display */,
  1874.     Window        /* w */,
  1875.     Window**        /* windows_return */,
  1876.     int*        /* count_return */
  1877. #endif
  1878. );
  1879. extern Status XSetWMColormapWindows(
  1880. #if NeedFunctionPrototypes
  1881.     Display*        /* display */,
  1882.     Window        /* w */,
  1883.     Window*        /* colormap_windows */,
  1884.     int            /* count */
  1885. #endif
  1886. );
  1887. extern void XFreeStringList(
  1888. #if NeedFunctionPrototypes
  1889.     char**        /* list */
  1890. #endif
  1891. );
  1892. extern XSetTransientForHint(
  1893. #if NeedFunctionPrototypes
  1894.     Display*        /* display */,
  1895.     Window        /* w */,
  1896.     Window        /* prop_window */
  1897. #endif
  1898. );
  1899.  
  1900. /* The following are given in alphabetical order */
  1901.  
  1902. extern XActivateScreenSaver(
  1903. #if NeedFunctionPrototypes
  1904.     Display*        /* display */
  1905. #endif
  1906. );
  1907.  
  1908. extern XAddHost(
  1909. #if NeedFunctionPrototypes
  1910.     Display*        /* display */,
  1911.     XHostAddress*    /* host */
  1912. #endif
  1913. );
  1914.  
  1915. extern XAddHosts(
  1916. #if NeedFunctionPrototypes
  1917.     Display*        /* display */,
  1918.     XHostAddress*    /* hosts */,
  1919.     int            /* num_hosts */    
  1920. #endif
  1921. );
  1922.  
  1923. extern XAddToExtensionList(
  1924. #if NeedFunctionPrototypes
  1925.     struct _XExtData**    /* structure */,
  1926.     XExtData*        /* ext_data */
  1927. #endif
  1928. );
  1929.  
  1930. extern XAddToSaveSet(
  1931. #if NeedFunctionPrototypes
  1932.     Display*        /* display */,
  1933.     Window        /* w */
  1934. #endif
  1935. );
  1936.  
  1937. extern Status XAllocColor(
  1938. #if NeedFunctionPrototypes
  1939.     Display*        /* display */,
  1940.     Colormap        /* colormap */,
  1941.     XColor*        /* screen_in_out */
  1942. #endif
  1943. );
  1944.  
  1945. extern Status XAllocColorCells(
  1946. #if NeedFunctionPrototypes
  1947.     Display*        /* display */,
  1948.     Colormap        /* colormap */,
  1949.     Bool            /* contig */,
  1950.     unsigned long*    /* plane_masks_return */,
  1951.     unsigned int    /* nplanes */,
  1952.     unsigned long*    /* pixels_return */,
  1953.     unsigned int     /* npixels */
  1954. #endif
  1955. );
  1956.  
  1957. extern Status XAllocColorPlanes(
  1958. #if NeedFunctionPrototypes
  1959.     Display*        /* display */,
  1960.     Colormap        /* colormap */,
  1961.     Bool        /* contig */,
  1962.     unsigned long*    /* pixels_return */,
  1963.     int            /* ncolors */,
  1964.     int            /* nreds */,
  1965.     int            /* ngreens */,
  1966.     int            /* nblues */,
  1967.     unsigned long*    /* rmask_return */,
  1968.     unsigned long*    /* gmask_return */,
  1969.     unsigned long*    /* bmask_return */
  1970. #endif
  1971. );
  1972.  
  1973. extern Status XAllocNamedColor(
  1974. #if NeedFunctionPrototypes
  1975.     Display*        /* display */,
  1976.     Colormap        /* colormap */,
  1977.     char*    /* color_name */,
  1978.     XColor*        /* screen_def_return */,
  1979.     XColor*        /* exact_def_return */
  1980. #endif
  1981. );
  1982.  
  1983. extern XAllowEvents(
  1984. #if NeedFunctionPrototypes
  1985.     Display*        /* display */,
  1986.     int            /* event_mode */,
  1987.     Time        /* time */
  1988. #endif
  1989. );
  1990.  
  1991. extern XAutoRepeatOff(
  1992. #if NeedFunctionPrototypes
  1993.     Display*        /* display */
  1994. #endif
  1995. );
  1996.  
  1997. extern XAutoRepeatOn(
  1998. #if NeedFunctionPrototypes
  1999.     Display*        /* display */
  2000. #endif
  2001. );
  2002.  
  2003. extern XBell(
  2004. #if NeedFunctionPrototypes
  2005.     Display*        /* display */,
  2006.     int            /* percent */
  2007. #endif
  2008. );
  2009.  
  2010. extern int XBitmapBitOrder(
  2011. #if NeedFunctionPrototypes
  2012.     Display*        /* display */
  2013. #endif
  2014. );
  2015.  
  2016. extern int XBitmapPad(
  2017. #if NeedFunctionPrototypes
  2018.     Display*        /* display */
  2019. #endif
  2020. );
  2021.  
  2022. extern int XBitmapUnit(
  2023. #if NeedFunctionPrototypes
  2024.     Display*        /* display */
  2025. #endif
  2026. );
  2027.  
  2028. extern int XCellsOfScreen(
  2029. #if NeedFunctionPrototypes
  2030.     Screen*        /* screen */
  2031. #endif
  2032. );
  2033.  
  2034. extern XChangeActivePointerGrab(
  2035. #if NeedFunctionPrototypes
  2036.     Display*        /* display */,
  2037.     unsigned int    /* event_mask */,
  2038.     Cursor        /* cursor */,
  2039.     Time        /* time */
  2040. #endif
  2041. );
  2042.  
  2043. extern XChangeGC(
  2044. #if NeedFunctionPrototypes
  2045.     Display*        /* display */,
  2046.     GC            /* gc */,
  2047.     unsigned long    /* valuemask */,
  2048.     XGCValues*        /* values */
  2049. #endif
  2050. );
  2051.  
  2052. extern XChangeKeyboardControl(
  2053. #if NeedFunctionPrototypes
  2054.     Display*        /* display */,
  2055.     unsigned long    /* value_mask */,
  2056.     XKeyboardControl*    /* values */
  2057. #endif
  2058. );
  2059.  
  2060. extern XChangeKeyboardMapping(
  2061. #if NeedFunctionPrototypes
  2062.     Display*        /* display */,
  2063.     int            /* first_keycode */,
  2064.     int            /* keysyms_per_keycode */,
  2065.     KeySym*        /* keysyms */,
  2066.     int            /* num_codes */
  2067. #endif
  2068. );
  2069.  
  2070. extern XChangePointerControl(
  2071. #if NeedFunctionPrototypes
  2072.     Display*        /* display */,
  2073.     Bool        /* do_accel */,
  2074.     Bool        /* do_threshold */,
  2075.     int            /* accel_numerator */,
  2076.     int            /* accel_denominator */,
  2077.     int            /* threshold */
  2078. #endif
  2079. );
  2080.  
  2081. extern XChangeProperty(
  2082. #if NeedFunctionPrototypes
  2083.     Display*        /* display */,
  2084.     Window        /* w */,
  2085.     Atom        /* property */,
  2086.     Atom        /* type */,
  2087.     int            /* format */,
  2088.     int            /* mode */,
  2089.      unsigned char*    /* data */,
  2090.     int            /* nelements */
  2091. #endif
  2092. );
  2093.  
  2094. extern XChangeSaveSet(
  2095. #if NeedFunctionPrototypes
  2096.     Display*        /* display */,
  2097.     Window        /* w */,
  2098.     int            /* change_mode */
  2099. #endif
  2100. );
  2101.  
  2102. extern XChangeWindowAttributes(
  2103. #if NeedFunctionPrototypes
  2104.     Display*        /* display */,
  2105.     Window        /* w */,
  2106.     unsigned long    /* valuemask */,
  2107.     XSetWindowAttributes* /* attributes */
  2108. #endif
  2109. );
  2110.  
  2111. extern Bool XCheckIfEvent(
  2112. #if NeedFunctionPrototypes
  2113.     Display*        /* display */,
  2114.     XEvent*        /* event_return */,
  2115.     Bool (*) (
  2116. #if NeedNestedPrototypes
  2117.            Display*            /* display */,
  2118.                XEvent*            /* event */,
  2119.                XPointer            /* arg */
  2120. #endif
  2121.              )        /* predicate */,
  2122.     XPointer        /* arg */
  2123. #endif
  2124. );
  2125.  
  2126. extern Bool XCheckMaskEvent(
  2127. #if NeedFunctionPrototypes
  2128.     Display*        /* display */,
  2129.     long        /* event_mask */,
  2130.     XEvent*        /* event_return */
  2131. #endif
  2132. );
  2133.  
  2134. extern Bool XCheckTypedEvent(
  2135. #if NeedFunctionPrototypes
  2136.     Display*        /* display */,
  2137.     int            /* event_type */,
  2138.     XEvent*        /* event_return */
  2139. #endif
  2140. );
  2141.  
  2142. extern Bool XCheckTypedWindowEvent(
  2143. #if NeedFunctionPrototypes
  2144.     Display*        /* display */,
  2145.     Window        /* w */,
  2146.     int            /* event_type */,
  2147.     XEvent*        /* event_return */
  2148. #endif
  2149. );
  2150.  
  2151. extern Bool XCheckWindowEvent(
  2152. #if NeedFunctionPrototypes
  2153.     Display*        /* display */,
  2154.     Window        /* w */,
  2155.     long        /* event_mask */,
  2156.     XEvent*        /* event_return */
  2157. #endif
  2158. );
  2159.  
  2160. extern XCirculateSubwindows(
  2161. #if NeedFunctionPrototypes
  2162.     Display*        /* display */,
  2163.     Window        /* w */,
  2164.     int            /* direction */
  2165. #endif
  2166. );
  2167.  
  2168. extern XCirculateSubwindowsDown(
  2169. #if NeedFunctionPrototypes
  2170.     Display*        /* display */,
  2171.     Window        /* w */
  2172. #endif
  2173. );
  2174.  
  2175. extern XCirculateSubwindowsUp(
  2176. #if NeedFunctionPrototypes
  2177.     Display*        /* display */,
  2178.     Window        /* w */
  2179. #endif
  2180. );
  2181.  
  2182. extern XClearArea(
  2183. #if NeedFunctionPrototypes
  2184.     Display*        /* display */,
  2185.     Window        /* w */,
  2186.     int            /* x */,
  2187.     int            /* y */,
  2188.     unsigned int    /* width */,
  2189.     unsigned int    /* height */,
  2190.     Bool        /* exposures */
  2191. #endif
  2192. );
  2193.  
  2194. extern XClearWindow(
  2195. #if NeedFunctionPrototypes
  2196.     Display*        /* display */,
  2197.     Window        /* w */
  2198. #endif
  2199. );
  2200.  
  2201. extern XCloseDisplay(
  2202. #if NeedFunctionPrototypes
  2203.     Display*        /* display */
  2204. #endif
  2205. );
  2206.  
  2207. extern XConfigureWindow(
  2208. #if NeedFunctionPrototypes
  2209.     Display*        /* display */,
  2210.     Window        /* w */,
  2211.     unsigned int    /* value_mask */,
  2212.     XWindowChanges*    /* values */         
  2213. #endif
  2214. );
  2215.  
  2216. extern int XConnectionNumber(
  2217. #if NeedFunctionPrototypes
  2218.     Display*        /* display */
  2219. #endif
  2220. );
  2221.  
  2222. extern XConvertSelection(
  2223. #if NeedFunctionPrototypes
  2224.     Display*        /* display */,
  2225.     Atom        /* selection */,
  2226.     Atom         /* target */,
  2227.     Atom        /* property */,
  2228.     Window        /* requestor */,
  2229.     Time        /* time */
  2230. #endif
  2231. );
  2232.  
  2233. extern XCopyArea(
  2234. #if NeedFunctionPrototypes
  2235.     Display*        /* display */,
  2236.     Drawable        /* src */,
  2237.     Drawable        /* dest */,
  2238.     GC            /* gc */,
  2239.     int            /* src_x */,
  2240.     int            /* src_y */,
  2241.     unsigned int    /* width */,
  2242.     unsigned int    /* height */,
  2243.     int            /* dest_x */,
  2244.     int            /* dest_y */
  2245. #endif
  2246. );
  2247.  
  2248. extern XCopyGC(
  2249. #if NeedFunctionPrototypes
  2250.     Display*        /* display */,
  2251.     GC            /* src */,
  2252.     unsigned long    /* valuemask */,
  2253.     GC            /* dest */
  2254. #endif
  2255. );
  2256.  
  2257. extern XCopyPlane(
  2258. #if NeedFunctionPrototypes
  2259.     Display*        /* display */,
  2260.     Drawable        /* src */,
  2261.     Drawable        /* dest */,
  2262.     GC            /* gc */,
  2263.     int            /* src_x */,
  2264.     int            /* src_y */,
  2265.     unsigned int    /* width */,
  2266.     unsigned int    /* height */,
  2267.     int            /* dest_x */,
  2268.     int            /* dest_y */,
  2269.     unsigned long    /* plane */
  2270. #endif
  2271. );
  2272.  
  2273. extern int XDefaultDepth(
  2274. #if NeedFunctionPrototypes
  2275.     Display*        /* display */,
  2276.     int            /* screen_number */
  2277. #endif
  2278. );
  2279.  
  2280. extern int XDefaultDepthOfScreen(
  2281. #if NeedFunctionPrototypes
  2282.     Screen*        /* screen */
  2283. #endif
  2284. );
  2285.  
  2286. extern int XDefaultScreen(
  2287. #if NeedFunctionPrototypes
  2288.     Display*        /* display */
  2289. #endif
  2290. );
  2291.  
  2292. extern XDefineCursor(
  2293. #if NeedFunctionPrototypes
  2294.     Display*        /* display */,
  2295.     Window        /* w */,
  2296.     Cursor        /* cursor */
  2297. #endif
  2298. );
  2299.  
  2300. extern XDeleteProperty(
  2301. #if NeedFunctionPrototypes
  2302.     Display*        /* display */,
  2303.     Window        /* w */,
  2304.     Atom        /* property */
  2305. #endif
  2306. );
  2307.  
  2308. extern XDestroyWindow(
  2309. #if NeedFunctionPrototypes
  2310.     Display*        /* display */,
  2311.     Window        /* w */
  2312. #endif
  2313. );
  2314.  
  2315. extern XDestroySubwindows(
  2316. #if NeedFunctionPrototypes
  2317.     Display*        /* display */,
  2318.     Window        /* w */
  2319. #endif
  2320. );
  2321.  
  2322. extern int XDoesBackingStore(
  2323. #if NeedFunctionPrototypes
  2324.     Screen*        /* screen */    
  2325. #endif
  2326. );
  2327.  
  2328. extern Bool XDoesSaveUnders(
  2329. #if NeedFunctionPrototypes
  2330.     Screen*        /* screen */
  2331. #endif
  2332. );
  2333.  
  2334. extern XDisableAccessControl(
  2335. #if NeedFunctionPrototypes
  2336.     Display*        /* display */
  2337. #endif
  2338. );
  2339.  
  2340.  
  2341. extern int XDisplayCells(
  2342. #if NeedFunctionPrototypes
  2343.     Display*        /* display */,
  2344.     int            /* screen_number */
  2345. #endif
  2346. );
  2347.  
  2348. extern int XDisplayHeight(
  2349. #if NeedFunctionPrototypes
  2350.     Display*        /* display */,
  2351.     int            /* screen_number */
  2352. #endif
  2353. );
  2354.  
  2355. extern int XDisplayHeightMM(
  2356. #if NeedFunctionPrototypes
  2357.     Display*        /* display */,
  2358.     int            /* screen_number */
  2359. #endif
  2360. );
  2361.  
  2362. extern XDisplayKeycodes(
  2363. #if NeedFunctionPrototypes
  2364.     Display*        /* display */,
  2365.     int*        /* min_keycodes_return */,
  2366.     int*        /* max_keycodes_return */
  2367. #endif
  2368. );
  2369.  
  2370. extern int XDisplayPlanes(
  2371. #if NeedFunctionPrototypes
  2372.     Display*        /* display */,
  2373.     int            /* screen_number */
  2374. #endif
  2375. );
  2376.  
  2377. extern int XDisplayWidth(
  2378. #if NeedFunctionPrototypes
  2379.     Display*        /* display */,
  2380.     int            /* screen_number */
  2381. #endif
  2382. );
  2383.  
  2384. extern int XDisplayWidthMM(
  2385. #if NeedFunctionPrototypes
  2386.     Display*        /* display */,
  2387.     int            /* screen_number */
  2388. #endif
  2389. );
  2390.  
  2391. extern XDrawArc(
  2392. #if NeedFunctionPrototypes
  2393.     Display*        /* display */,
  2394.     Drawable        /* d */,
  2395.     GC            /* gc */,
  2396.     int            /* x */,
  2397.     int            /* y */,
  2398.     unsigned int    /* width */,
  2399.     unsigned int    /* height */,
  2400.     int            /* angle1 */,
  2401.     int            /* angle2 */
  2402. #endif
  2403. );
  2404.  
  2405. extern XDrawArcs(
  2406. #if NeedFunctionPrototypes
  2407.     Display*        /* display */,
  2408.     Drawable        /* d */,
  2409.     GC            /* gc */,
  2410.     XArc*        /* arcs */,
  2411.     int            /* narcs */
  2412. #endif
  2413. );
  2414.  
  2415. extern XDrawImageString(
  2416. #if NeedFunctionPrototypes
  2417.     Display*        /* display */,
  2418.     Drawable        /* d */,
  2419.     GC            /* gc */,
  2420.     int            /* x */,
  2421.     int            /* y */,
  2422.     char*    /* string */,
  2423.     int            /* length */
  2424. #endif
  2425. );
  2426.  
  2427. extern XDrawImageString16(
  2428. #if NeedFunctionPrototypes
  2429.     Display*        /* display */,
  2430.     Drawable        /* d */,
  2431.     GC            /* gc */,
  2432.     int            /* x */,
  2433.     int            /* y */,
  2434.     char*    /* string */,
  2435.     int            /* length */
  2436. #endif
  2437. );
  2438.  
  2439. extern XDrawLine(
  2440. #if NeedFunctionPrototypes
  2441.     Display*        /* display */,
  2442.     Drawable        /* d */,
  2443.     GC            /* gc */,
  2444.     int            /* x1 */,
  2445.     int            /* x2 */,
  2446.     int            /* y1 */,
  2447.     int            /* y2 */
  2448. #endif
  2449. );
  2450.  
  2451. extern XDrawLines(
  2452. #if NeedFunctionPrototypes
  2453.     Display*        /* display */,
  2454.     Drawable        /* d */,
  2455.     GC            /* gc */,
  2456.     XPoint*        /* points */,
  2457.     int            /* npoints */,
  2458.     int            /* mode */
  2459. #endif
  2460. );
  2461.  
  2462. extern XDrawPoint(
  2463. #if NeedFunctionPrototypes
  2464.     Display*        /* display */,
  2465.     Drawable        /* d */,
  2466.     GC            /* gc */,
  2467.     int            /* x */,
  2468.     int            /* y */
  2469. #endif
  2470. );
  2471.  
  2472. extern XDrawPoints(
  2473. #if NeedFunctionPrototypes
  2474.     Display*        /* display */,
  2475.     Drawable        /* d */,
  2476.     GC            /* gc */,
  2477.     XPoint*        /* points */,
  2478.     int            /* npoints */,
  2479.     int            /* mode */
  2480. #endif
  2481. );
  2482.  
  2483. extern XDrawRectangle(
  2484. #if NeedFunctionPrototypes
  2485.     Display*        /* display */,
  2486.     Drawable        /* d */,
  2487.     GC            /* gc */,
  2488.     int            /* x */,
  2489.     int            /* y */,
  2490.     unsigned int    /* width */,
  2491.     unsigned int    /* height */
  2492. #endif
  2493. );
  2494.  
  2495. extern XDrawRectangles(
  2496. #if NeedFunctionPrototypes
  2497.     Display*        /* display */,
  2498.     Drawable        /* d */,
  2499.     GC            /* gc */,
  2500.     XRectangle*        /* rectangles */,
  2501.     int            /* nrectangles */
  2502. #endif
  2503. );
  2504.  
  2505. extern XDrawSegments(
  2506. #if NeedFunctionPrototypes
  2507.     Display*        /* display */,
  2508.     Drawable        /* d */,
  2509.     GC            /* gc */,
  2510.     XSegment*        /* segments */,
  2511.     int            /* nsegments */
  2512. #endif
  2513. );
  2514.  
  2515. extern XDrawString(
  2516. #if NeedFunctionPrototypes
  2517.     Display*        /* display */,
  2518.     Drawable        /* d */,
  2519.     GC            /* gc */,
  2520.     int            /* x */,
  2521.     int            /* y */,
  2522.     char*    /* string */,
  2523.     int            /* length */
  2524. #endif
  2525. );
  2526.  
  2527. extern XDrawString16(
  2528. #if NeedFunctionPrototypes
  2529.     Display*        /* display */,
  2530.     Drawable        /* d */,
  2531.     GC            /* gc */,
  2532.     int            /* x */,
  2533.     int            /* y */,
  2534.     char*    /* string */,
  2535.     int            /* length */
  2536. #endif
  2537. );
  2538.  
  2539. extern XDrawText(
  2540. #if NeedFunctionPrototypes
  2541.     Display*        /* display */,
  2542.     Drawable        /* d */,
  2543.     GC            /* gc */,
  2544.     int            /* x */,
  2545.     int            /* y */,
  2546.     XTextItem*        /* items */,
  2547.     int            /* nitems */
  2548. #endif
  2549. );
  2550.  
  2551. extern XDrawText16(
  2552. #if NeedFunctionPrototypes
  2553.     Display*        /* display */,
  2554.     Drawable        /* d */,
  2555.     GC            /* gc */,
  2556.     int            /* x */,
  2557.     int            /* y */,
  2558.     XTextItem16*    /* items */,
  2559.     int            /* nitems */
  2560. #endif
  2561. );
  2562.  
  2563. extern XEnableAccessControl(
  2564. #if NeedFunctionPrototypes
  2565.     Display*        /* display */
  2566. #endif
  2567. );
  2568.  
  2569. extern int XEventsQueued(
  2570. #if NeedFunctionPrototypes
  2571.     Display*        /* display */,
  2572.     int            /* mode */
  2573. #endif
  2574. );
  2575.  
  2576. extern Status XFetchName(
  2577. #if NeedFunctionPrototypes
  2578.     Display*        /* display */,
  2579.     Window        /* w */,
  2580.     char**        /* window_name_return */
  2581. #endif
  2582. );
  2583.  
  2584. extern XFillArc(
  2585. #if NeedFunctionPrototypes
  2586.     Display*        /* display */,
  2587.     Drawable        /* d */,
  2588.     GC            /* gc */,
  2589.     int            /* x */,
  2590.     int            /* y */,
  2591.     unsigned int    /* width */,
  2592.     unsigned int    /* height */,
  2593.     int            /* angle1 */,
  2594.     int            /* angle2 */
  2595. #endif
  2596. );
  2597.  
  2598. extern XFillArcs(
  2599. #if NeedFunctionPrototypes
  2600.     Display*        /* display */,
  2601.     Drawable        /* d */,
  2602.     GC            /* gc */,
  2603.     XArc*        /* arcs */,
  2604.     int            /* narcs */
  2605. #endif
  2606. );
  2607.  
  2608. extern XFillPolygon(
  2609. #if NeedFunctionPrototypes
  2610.     Display*        /* display */,
  2611.     Drawable        /* d */,
  2612.     GC            /* gc */,
  2613.     XPoint*        /* points */,
  2614.     int            /* npoints */,
  2615.     int            /* shape */,
  2616.     int            /* mode */
  2617. #endif
  2618. );
  2619.  
  2620. extern XFillRectangle(
  2621. #if NeedFunctionPrototypes
  2622.     Display*        /* display */,
  2623.     Drawable        /* d */,
  2624.     GC            /* gc */,
  2625.     int            /* x */,
  2626.     int            /* y */,
  2627.     unsigned int    /* width */,
  2628.     unsigned int    /* height */
  2629. #endif
  2630. );
  2631.  
  2632. extern XFillRectangles(
  2633. #if NeedFunctionPrototypes
  2634.     Display*        /* display */,
  2635.     Drawable        /* d */,
  2636.     GC            /* gc */,
  2637.     XRectangle*        /* rectangles */,
  2638.     int            /* nrectangles */
  2639. #endif
  2640. );
  2641.  
  2642. extern XFlush(
  2643. #if NeedFunctionPrototypes
  2644.     Display*        /* display */
  2645. #endif
  2646. );
  2647.  
  2648. extern XForceScreenSaver(
  2649. #if NeedFunctionPrototypes
  2650.     Display*        /* display */,
  2651.     int            /* mode */
  2652. #endif
  2653. );
  2654.  
  2655. extern XFree(
  2656. #if NeedFunctionPrototypes
  2657.     void*        /* data */
  2658. #endif
  2659. );
  2660.  
  2661. extern XFreeColormap(
  2662. #if NeedFunctionPrototypes
  2663.     Display*        /* display */,
  2664.     Colormap        /* colormap */
  2665. #endif
  2666. );
  2667.  
  2668. extern XFreeColors(
  2669. #if NeedFunctionPrototypes
  2670.     Display*        /* display */,
  2671.     Colormap        /* colormap */,
  2672.     unsigned long*    /* pixels */,
  2673.     int            /* npixels */,
  2674.     unsigned long    /* planes */
  2675. #endif
  2676. );
  2677.  
  2678. extern XFreeCursor(
  2679. #if NeedFunctionPrototypes
  2680.     Display*        /* display */,
  2681.     Cursor        /* cursor */
  2682. #endif
  2683. );
  2684.  
  2685. extern XFreeExtensionList(
  2686. #if NeedFunctionPrototypes
  2687.     char**        /* list */    
  2688. #endif
  2689. );
  2690.  
  2691. extern XFreeFont(
  2692. #if NeedFunctionPrototypes
  2693.     Display*        /* display */,
  2694.     XFontStruct*    /* font_struct */
  2695. #endif
  2696. );
  2697.  
  2698. extern XFreeFontInfo(
  2699. #if NeedFunctionPrototypes
  2700.     char**        /* names */,
  2701.     XFontStruct*    /* free_info */,
  2702.     int            /* actual_count */
  2703. #endif
  2704. );
  2705.  
  2706. extern XFreeFontNames(
  2707. #if NeedFunctionPrototypes
  2708.     char**        /* list */
  2709. #endif
  2710. );
  2711.  
  2712. extern XFreeFontPath(
  2713. #if NeedFunctionPrototypes
  2714.     char**        /* list */
  2715. #endif
  2716. );
  2717.  
  2718. extern XFreeGC(
  2719. #if NeedFunctionPrototypes
  2720.     Display*        /* display */,
  2721.     GC            /* gc */
  2722. #endif
  2723. );
  2724.  
  2725. extern XFreeModifiermap(
  2726. #if NeedFunctionPrototypes
  2727.     XModifierKeymap*    /* modmap */
  2728. #endif
  2729. );
  2730.  
  2731. extern XFreePixmap(
  2732. #if NeedFunctionPrototypes
  2733.     Display*        /* display */,
  2734.     Pixmap        /* pixmap */
  2735. #endif
  2736. );
  2737.  
  2738. extern int XGeometry(
  2739. #if NeedFunctionPrototypes
  2740.     Display*        /* display */,
  2741.     int            /* screen */,
  2742.      char*    /* position */,
  2743.      char*    /* default_position */,
  2744.     unsigned int    /* bwidth */,
  2745.     unsigned int    /* fwidth */,
  2746.     unsigned int    /* fheight */,
  2747.     int            /* xadder */,
  2748.     int            /* yadder */,
  2749.     int*        /* x_return */,
  2750.     int*        /* y_return */,
  2751.     int*        /* width_return */,
  2752.     int*        /* height_return */
  2753. #endif
  2754. );
  2755.  
  2756. extern XGetErrorDatabaseText(
  2757. #if NeedFunctionPrototypes
  2758.     Display*        /* display */,
  2759.      char*    /* name */,
  2760.      char*    /* message */,
  2761.      char*    /* default_string */,
  2762.     char*        /* buffer_return */,
  2763.     int            /* length */
  2764. #endif
  2765. );
  2766.  
  2767. extern XGetErrorText(
  2768. #if NeedFunctionPrototypes
  2769.     Display*        /* display */,
  2770.     int            /* code */,
  2771.     char*        /* buffer_return */,
  2772.     int            /* length */
  2773. #endif
  2774. );
  2775.  
  2776. extern Bool XGetFontProperty(
  2777. #if NeedFunctionPrototypes
  2778.     XFontStruct*    /* font_struct */,
  2779.     Atom        /* atom */,
  2780.     unsigned long*    /* value_return */
  2781. #endif
  2782. );
  2783.  
  2784. extern Status XGetGCValues(
  2785. #if NeedFunctionPrototypes
  2786.     Display*        /* display */,
  2787.     GC            /* gc */,
  2788.     unsigned long    /* valuemask */,
  2789.     XGCValues*        /* values_return */
  2790. #endif
  2791. );
  2792.  
  2793. extern Status XGetGeometry(
  2794. #if NeedFunctionPrototypes
  2795.     Display*        /* display */,
  2796.     Drawable        /* d */,
  2797.     Window*        /* root_return */,
  2798.     int*        /* x_return */,
  2799.     int*        /* y_return */,
  2800.     unsigned int*    /* width_return */,
  2801.     unsigned int*    /* height_return */,
  2802.     unsigned int*    /* border_width_return */,
  2803.     unsigned int*    /* depth_return */
  2804. #endif
  2805. );
  2806.  
  2807. extern Status XGetIconName(
  2808. #if NeedFunctionPrototypes
  2809.     Display*        /* display */,
  2810.     Window        /* w */,
  2811.     char**        /* icon_name_return */
  2812. #endif
  2813. );
  2814.  
  2815. extern XGetInputFocus(
  2816. #if NeedFunctionPrototypes
  2817.     Display*        /* display */,
  2818.     Window*        /* focus_return */,
  2819.     int*        /* revert_to_return */
  2820. #endif
  2821. );
  2822.  
  2823. extern XGetKeyboardControl(
  2824. #if NeedFunctionPrototypes
  2825.     Display*        /* display */,
  2826.     XKeyboardState*    /* values_return */
  2827. #endif
  2828. );
  2829.  
  2830. extern XGetPointerControl(
  2831. #if NeedFunctionPrototypes
  2832.     Display*        /* display */,
  2833.     int*        /* accel_numerator_return */,
  2834.     int*        /* accel_denominator_return */,
  2835.     int*        /* threshold_return */
  2836. #endif
  2837. );
  2838.  
  2839. extern int XGetPointerMapping(
  2840. #if NeedFunctionPrototypes
  2841.     Display*        /* display */,
  2842.     unsigned char*    /* map_return */,
  2843.     int            /* nmap */
  2844. #endif
  2845. );
  2846.  
  2847. extern XGetScreenSaver(
  2848. #if NeedFunctionPrototypes
  2849.     Display*        /* display */,
  2850.     int*        /* timeout_return */,
  2851.     int*        /* interval_return */,
  2852.     int*        /* prefer_blanking_return */,
  2853.     int*        /* allow_exposures_return */
  2854. #endif
  2855. );
  2856.  
  2857. extern Status XGetTransientForHint(
  2858. #if NeedFunctionPrototypes
  2859.     Display*        /* display */,
  2860.     Window        /* w */,
  2861.     Window*        /* prop_window_return */
  2862. #endif
  2863. );
  2864.  
  2865. extern int XGetWindowProperty(
  2866. #if NeedFunctionPrototypes
  2867.     Display*        /* display */,
  2868.     Window        /* w */,
  2869.     Atom        /* property */,
  2870.     long        /* long_offset */,
  2871.     long        /* long_length */,
  2872.     Bool        /* delete */,
  2873.     Atom        /* req_type */,
  2874.     Atom*        /* actual_type_return */,
  2875.     int*        /* actual_format_return */,
  2876.     unsigned long*    /* nitems_return */,
  2877.     unsigned long*    /* bytes_after_return */,
  2878.     unsigned char**    /* prop_return */
  2879. #endif
  2880. );
  2881.  
  2882. extern Status XGetWindowAttributes(
  2883. #if NeedFunctionPrototypes
  2884.     Display*        /* display */,
  2885.     Window        /* w */,
  2886.     XWindowAttributes*    /* window_attributes_return */
  2887. #endif
  2888. );
  2889.  
  2890. extern XGrabButton(
  2891. #if NeedFunctionPrototypes
  2892.     Display*        /* display */,
  2893.     unsigned int    /* button */,
  2894.     unsigned int    /* modifiers */,
  2895.     Window        /* grab_window */,
  2896.     Bool        /* owner_events */,
  2897.     unsigned int    /* event_mask */,
  2898.     int            /* pointer_mode */,
  2899.     int            /* keyboard_mode */,
  2900.     Window        /* confine_to */,
  2901.     Cursor        /* cursor */
  2902. #endif
  2903. );
  2904.  
  2905. extern XGrabKey(
  2906. #if NeedFunctionPrototypes
  2907.     Display*        /* display */,
  2908.     int            /* keycode */,
  2909.     unsigned int    /* modifiers */,
  2910.     Window        /* grab_window */,
  2911.     Bool        /* owner_events */,
  2912.     int            /* pointer_mode */,
  2913.     int            /* keyboard_mode */
  2914. #endif
  2915. );
  2916.  
  2917. extern int XGrabKeyboard(
  2918. #if NeedFunctionPrototypes
  2919.     Display*        /* display */,
  2920.     Window        /* grab_window */,
  2921.     Bool        /* owner_events */,
  2922.     int            /* pointer_mode */,
  2923.     int            /* keyboard_mode */,
  2924.     Time        /* time */
  2925. #endif
  2926. );
  2927.  
  2928. extern int XGrabPointer(
  2929. #if NeedFunctionPrototypes
  2930.     Display*        /* display */,
  2931.     Window        /* grab_window */,
  2932.     Bool        /* owner_events */,
  2933.     unsigned int    /* event_mask */,
  2934.     int            /* pointer_mode */,
  2935.     int            /* keyboard_mode */,
  2936.     Window        /* confine_to */,
  2937.     Cursor        /* cursor */,
  2938.     Time        /* time */
  2939. #endif
  2940. );
  2941.  
  2942. extern XGrabServer(
  2943. #if NeedFunctionPrototypes
  2944.     Display*        /* display */
  2945. #endif
  2946. );
  2947.  
  2948. extern int XHeightMMOfScreen(
  2949. #if NeedFunctionPrototypes
  2950.     Screen*        /* screen */
  2951. #endif
  2952. );
  2953.  
  2954. extern int XHeightOfScreen(
  2955. #if NeedFunctionPrototypes
  2956.     Screen*        /* screen */
  2957. #endif
  2958. );
  2959.  
  2960. extern XIfEvent(
  2961. #if NeedFunctionPrototypes
  2962.     Display*        /* display */,
  2963.     XEvent*        /* event_return */,
  2964.     Bool (*) (
  2965. #if NeedNestedPrototypes
  2966.            Display*            /* display */,
  2967.                XEvent*            /* event */,
  2968.                XPointer            /* arg */
  2969. #endif
  2970.              )        /* predicate */,
  2971.     XPointer        /* arg */
  2972. #endif
  2973. );
  2974.  
  2975. extern int XImageByteOrder(
  2976. #if NeedFunctionPrototypes
  2977.     Display*        /* display */
  2978. #endif
  2979. );
  2980.  
  2981. extern XInstallColormap(
  2982. #if NeedFunctionPrototypes
  2983.     Display*        /* display */,
  2984.     Colormap        /* colormap */
  2985. #endif
  2986. );
  2987.  
  2988. extern KeyCode XKeysymToKeycode(
  2989. #if NeedFunctionPrototypes
  2990.     Display*        /* display */,
  2991.     KeySym        /* keysym */
  2992. #endif
  2993. );
  2994.  
  2995. extern XKillClient(
  2996. #if NeedFunctionPrototypes
  2997.     Display*        /* display */,
  2998.     XID            /* resource */
  2999. #endif
  3000. );
  3001.  
  3002. extern unsigned long XLastKnownRequestProcessed(
  3003. #if NeedFunctionPrototypes
  3004.     Display*        /* display */
  3005. #endif
  3006. );
  3007.  
  3008. extern Status XLookupColor(
  3009. #if NeedFunctionPrototypes
  3010.     Display*        /* display */,
  3011.     Colormap        /* colormap */,
  3012.     char*    /* color_name */,
  3013.     XColor*        /* exact_def_return */,
  3014.     XColor*        /* screen_def_return */
  3015. #endif
  3016. );
  3017.  
  3018. extern XLowerWindow(
  3019. #if NeedFunctionPrototypes
  3020.     Display*        /* display */,
  3021.     Window        /* w */
  3022. #endif
  3023. );
  3024.  
  3025. extern XMapRaised(
  3026. #if NeedFunctionPrototypes
  3027.     Display*        /* display */,
  3028.     Window        /* w */
  3029. #endif
  3030. );
  3031.  
  3032. extern XMapSubwindows(
  3033. #if NeedFunctionPrototypes
  3034.     Display*        /* display */,
  3035.     Window        /* w */
  3036. #endif
  3037. );
  3038.  
  3039. extern XMapWindow(
  3040. #if NeedFunctionPrototypes
  3041.     Display*        /* display */,
  3042.     Window        /* w */
  3043. #endif
  3044. );
  3045.  
  3046. extern XMaskEvent(
  3047. #if NeedFunctionPrototypes
  3048.     Display*        /* display */,
  3049.     long        /* event_mask */,
  3050.     XEvent*        /* event_return */
  3051. #endif
  3052. );
  3053.  
  3054. extern int XMaxCmapsOfScreen(
  3055. #if NeedFunctionPrototypes
  3056.     Screen*        /* screen */
  3057. #endif
  3058. );
  3059.  
  3060. extern int XMinCmapsOfScreen(
  3061. #if NeedFunctionPrototypes
  3062.     Screen*        /* screen */
  3063. #endif
  3064. );
  3065.  
  3066. extern XMoveResizeWindow(
  3067. #if NeedFunctionPrototypes
  3068.     Display*        /* display */,
  3069.     Window        /* w */,
  3070.     int            /* x */,
  3071.     int            /* y */,
  3072.     unsigned int    /* width */,
  3073.     unsigned int    /* height */
  3074. #endif
  3075. );
  3076.  
  3077. extern XMoveWindow(
  3078. #if NeedFunctionPrototypes
  3079.     Display*        /* display */,
  3080.     Window        /* w */,
  3081.     int            /* x */,
  3082.     int            /* y */
  3083. #endif
  3084. );
  3085.  
  3086. extern XNextEvent(
  3087. #if NeedFunctionPrototypes
  3088.     Display*        /* display */,
  3089.     XEvent*        /* event_return */
  3090. #endif
  3091. );
  3092.  
  3093. extern XNoOp(
  3094. #if NeedFunctionPrototypes
  3095.     Display*        /* display */
  3096. #endif
  3097. );
  3098.  
  3099. extern Status XParseColor(
  3100. #if NeedFunctionPrototypes
  3101.     Display*        /* display */,
  3102.     Colormap        /* colormap */,
  3103.     char*    /* spec */,
  3104.     XColor*        /* exact_def_return */
  3105. #endif
  3106. );
  3107.  
  3108. extern int XParseGeometry(
  3109. #if NeedFunctionPrototypes
  3110.     char*    /* parsestring */,
  3111.     int*        /* x_return */,
  3112.     int*        /* y_return */,
  3113.     unsigned int*    /* width_return */,
  3114.     unsigned int*    /* height_return */
  3115. #endif
  3116. );
  3117.  
  3118. extern XPeekEvent(
  3119. #if NeedFunctionPrototypes
  3120.     Display*        /* display */,
  3121.     XEvent*        /* event_return */
  3122. #endif
  3123. );
  3124.  
  3125. extern XPeekIfEvent(
  3126. #if NeedFunctionPrototypes
  3127.     Display*        /* display */,
  3128.     XEvent*        /* event_return */,
  3129.     Bool (*) (
  3130. #if NeedNestedPrototypes
  3131.            Display*        /* display */,
  3132.                XEvent*        /* event */,
  3133.                XPointer        /* arg */
  3134. #endif
  3135.              )        /* predicate */,
  3136.     XPointer        /* arg */
  3137. #endif
  3138. );
  3139.  
  3140. extern int XPending(
  3141. #if NeedFunctionPrototypes
  3142.     Display*        /* display */
  3143. #endif
  3144. );
  3145.  
  3146. extern int XPlanesOfScreen(
  3147. #if NeedFunctionPrototypes
  3148.     Screen*        /* screen */
  3149.     
  3150. #endif
  3151. );
  3152.  
  3153. extern int XProtocolRevision(
  3154. #if NeedFunctionPrototypes
  3155.     Display*        /* display */
  3156. #endif
  3157. );
  3158.  
  3159. extern int XProtocolVersion(
  3160. #if NeedFunctionPrototypes
  3161.     Display*        /* display */
  3162. #endif
  3163. );
  3164.  
  3165.  
  3166. extern XPutBackEvent(
  3167. #if NeedFunctionPrototypes
  3168.     Display*        /* display */,
  3169.     XEvent*        /* event */
  3170. #endif
  3171. );
  3172.  
  3173. extern XPutImage(
  3174. #if NeedFunctionPrototypes
  3175.     Display*        /* display */,
  3176.     Drawable        /* d */,
  3177.     GC            /* gc */,
  3178.     XImage*        /* image */,
  3179.     int            /* src_x */,
  3180.     int            /* src_y */,
  3181.     int            /* dest_x */,
  3182.     int            /* dest_y */,
  3183.     unsigned int    /* width */,
  3184.     unsigned int    /* height */      
  3185. #endif
  3186. );
  3187.  
  3188. extern int XQLength(
  3189. #if NeedFunctionPrototypes
  3190.     Display*        /* display */
  3191. #endif
  3192. );
  3193.  
  3194. extern Status XQueryBestCursor(
  3195. #if NeedFunctionPrototypes
  3196.     Display*        /* display */,
  3197.     Drawable        /* d */,
  3198.     unsigned int        /* width */,
  3199.     unsigned int    /* height */,
  3200.     unsigned int*    /* width_return */,
  3201.     unsigned int*    /* height_return */
  3202. #endif
  3203. );
  3204.  
  3205. extern Status XQueryBestSize(
  3206. #if NeedFunctionPrototypes
  3207.     Display*        /* display */,
  3208.     int            /* class */,
  3209.     Drawable        /* which_screen */,
  3210.     unsigned int    /* width */,
  3211.     unsigned int    /* height */,
  3212.     unsigned int*    /* width_return */,
  3213.     unsigned int*    /* height_return */
  3214. #endif
  3215. );
  3216.  
  3217. extern Status XQueryBestStipple(
  3218. #if NeedFunctionPrototypes
  3219.     Display*        /* display */,
  3220.     Drawable        /* which_screen */,
  3221.     unsigned int    /* width */,
  3222.     unsigned int    /* height */,
  3223.     unsigned int*    /* width_return */,
  3224.     unsigned int*    /* height_return */
  3225. #endif
  3226. );
  3227.  
  3228. extern Status XQueryBestTile(
  3229. #if NeedFunctionPrototypes
  3230.     Display*        /* display */,
  3231.     Drawable        /* which_screen */,
  3232.     unsigned int    /* width */,
  3233.     unsigned int    /* height */,
  3234.     unsigned int*    /* width_return */,
  3235.     unsigned int*    /* height_return */
  3236. #endif
  3237. );
  3238.  
  3239. extern XQueryColor(
  3240. #if NeedFunctionPrototypes
  3241.     Display*        /* display */,
  3242.     Colormap        /* colormap */,
  3243.     XColor*        /* def_in_out */
  3244. #endif
  3245. );
  3246.  
  3247. extern XQueryColors(
  3248. #if NeedFunctionPrototypes
  3249.     Display*        /* display */,
  3250.     Colormap        /* colormap */,
  3251.     XColor*        /* defs_in_out */,
  3252.     int            /* ncolors */
  3253. #endif
  3254. );
  3255.  
  3256. extern Bool XQueryExtension(
  3257. #if NeedFunctionPrototypes
  3258.     Display*        /* display */,
  3259.      char*    /* name */,
  3260.     int*        /* major_opcode_return */,
  3261.     int*        /* first_event_return */,
  3262.     int*        /* first_error_return */
  3263. #endif
  3264. );
  3265.  
  3266. extern XQueryKeymap(
  3267. #if NeedFunctionPrototypes
  3268.     Display*        /* display */,
  3269.     char [32]        /* keys_return */
  3270. #endif
  3271. );
  3272.  
  3273. extern Bool XQueryPointer(
  3274. #if NeedFunctionPrototypes
  3275.     Display*        /* display */,
  3276.     Window        /* w */,
  3277.     Window*        /* root_return */,
  3278.     Window*        /* child_return */,
  3279.     int*        /* root_x_return */,
  3280.     int*        /* root_y_return */,
  3281.     int*        /* win_x_return */,
  3282.     int*        /* win_y_return */,
  3283.     unsigned int*       /* mask_return */
  3284. #endif
  3285. );
  3286.  
  3287. extern XQueryTextExtents(
  3288. #if NeedFunctionPrototypes
  3289.     Display*        /* display */,
  3290.     XID            /* font_ID */,
  3291.      char*    /* string */,
  3292.     int            /* nchars */,
  3293.     int*        /* direction_return */,
  3294.     int*        /* font_ascent_return */,
  3295.     int*        /* font_descent_return */,
  3296.     XCharStruct*    /* overall_return */    
  3297. #endif
  3298. );
  3299.  
  3300. extern XQueryTextExtents16(
  3301. #if NeedFunctionPrototypes
  3302.     Display*        /* display */,
  3303.     XID            /* font_ID */,
  3304.      XChar2b*    /* string */,
  3305.     int            /* nchars */,
  3306.     int*        /* direction_return */,
  3307.     int*        /* font_ascent_return */,
  3308.     int*        /* font_descent_return */,
  3309.     XCharStruct*    /* overall_return */
  3310. #endif
  3311. );
  3312.  
  3313. extern Status XQueryTree(
  3314. #if NeedFunctionPrototypes
  3315.     Display*        /* display */,
  3316.     Window        /* w */,
  3317.     Window*        /* root_return */,
  3318.     Window*        /* parent_return */,
  3319.     Window**        /* children_return */,
  3320.     unsigned int*    /* nchildren_return */
  3321. #endif
  3322. );
  3323.  
  3324. extern XRaiseWindow(
  3325. #if NeedFunctionPrototypes
  3326.     Display*        /* display */,
  3327.     Window        /* w */
  3328. #endif
  3329. );
  3330.  
  3331. extern int XReadBitmapFile(
  3332. #if NeedFunctionPrototypes
  3333.     Display*        /* display */,
  3334.     Drawable         /* d */,
  3335.     char*    /* filename */,
  3336.     unsigned int*    /* width_return */,
  3337.     unsigned int*    /* height_return */,
  3338.     Pixmap*        /* bitmap_return */,
  3339.     int*        /* x_hot_return */,
  3340.     int*        /* y_hot_return */
  3341. #endif
  3342. );
  3343.  
  3344. extern XRebindKeysym(
  3345. #if NeedFunctionPrototypes
  3346.     Display*        /* display */,
  3347.     KeySym        /* keysym */,
  3348.     KeySym*        /* list */,
  3349.     int            /* mod_count */,
  3350.      unsigned char*    /* string */,
  3351.     int            /* bytes_string */
  3352. #endif
  3353. );
  3354.  
  3355. extern XRecolorCursor(
  3356. #if NeedFunctionPrototypes
  3357.     Display*        /* display */,
  3358.     Cursor        /* cursor */,
  3359.     XColor*        /* foreground_color */,
  3360.     XColor*        /* background_color */
  3361. #endif
  3362. );
  3363.  
  3364. extern XRefreshKeyboardMapping(
  3365. #if NeedFunctionPrototypes
  3366.     XMappingEvent*    /* event_map */    
  3367. #endif
  3368. );
  3369.  
  3370. extern XRemoveFromSaveSet(
  3371. #if NeedFunctionPrototypes
  3372.     Display*        /* display */,
  3373.     Window        /* w */
  3374. #endif
  3375. );
  3376.  
  3377. extern XRemoveHost(
  3378. #if NeedFunctionPrototypes
  3379.     Display*        /* display */,
  3380.     XHostAddress*    /* host */
  3381. #endif
  3382. );
  3383.  
  3384. extern XRemoveHosts(
  3385. #if NeedFunctionPrototypes
  3386.     Display*        /* display */,
  3387.     XHostAddress*    /* hosts */,
  3388.     int            /* num_hosts */
  3389. #endif
  3390. );
  3391.  
  3392. extern XReparentWindow(
  3393. #if NeedFunctionPrototypes
  3394.     Display*        /* display */,
  3395.     Window        /* w */,
  3396.     Window        /* parent */,
  3397.     int            /* x */,
  3398.     int            /* y */
  3399. #endif
  3400. );
  3401.  
  3402. extern XResetScreenSaver(
  3403. #if NeedFunctionPrototypes
  3404.     Display*        /* display */
  3405. #endif
  3406. );
  3407.  
  3408. extern XResizeWindow(
  3409. #if NeedFunctionPrototypes
  3410.     Display*        /* display */,
  3411.     Window        /* w */,
  3412.     unsigned int    /* width */,
  3413.     unsigned int    /* height */
  3414. #endif
  3415. );
  3416.  
  3417. extern XRestackWindows(
  3418. #if NeedFunctionPrototypes
  3419.     Display*        /* display */,
  3420.     Window*        /* windows */,
  3421.     int            /* nwindows */
  3422. #endif
  3423. );
  3424.  
  3425. extern XRotateBuffers(
  3426. #if NeedFunctionPrototypes
  3427.     Display*        /* display */,
  3428.     int            /* rotate */
  3429. #endif
  3430. );
  3431.  
  3432. extern XRotateWindowProperties(
  3433. #if NeedFunctionPrototypes
  3434.     Display*        /* display */,
  3435.     Window        /* w */,
  3436.     Atom*        /* properties */,
  3437.     int            /* num_prop */,
  3438.     int            /* npositions */
  3439. #endif
  3440. );
  3441.  
  3442. extern int XScreenCount(
  3443. #if NeedFunctionPrototypes
  3444.     Display*        /* display */
  3445. #endif
  3446. );
  3447.  
  3448. extern XSelectInput(
  3449. #if NeedFunctionPrototypes
  3450.     Display*        /* display */,
  3451.     Window        /* w */,
  3452.     long        /* event_mask */
  3453. #endif
  3454. );
  3455.  
  3456. extern Status XSendEvent(
  3457. #if NeedFunctionPrototypes
  3458.     Display*        /* display */,
  3459.     Window        /* w */,
  3460.     Bool        /* propagate */,
  3461.     long        /* event_mask */,
  3462.     XEvent*        /* event_send */
  3463. #endif
  3464. );
  3465.  
  3466. extern XSetAccessControl(
  3467. #if NeedFunctionPrototypes
  3468.     Display*        /* display */,
  3469.     int            /* mode */
  3470. #endif
  3471. );
  3472.  
  3473. extern XSetArcMode(
  3474. #if NeedFunctionPrototypes
  3475.     Display*        /* display */,
  3476.     GC            /* gc */,
  3477.     int            /* arc_mode */
  3478. #endif
  3479. );
  3480.  
  3481. extern XSetBackground(
  3482. #if NeedFunctionPrototypes
  3483.     Display*        /* display */,
  3484.     GC            /* gc */,
  3485.     unsigned long    /* background */
  3486. #endif
  3487. );
  3488.  
  3489. extern XSetClipMask(
  3490. #if NeedFunctionPrototypes
  3491.     Display*        /* display */,
  3492.     GC            /* gc */,
  3493.     Pixmap        /* pixmap */
  3494. #endif
  3495. );
  3496.  
  3497. extern XSetClipOrigin(
  3498. #if NeedFunctionPrototypes
  3499.     Display*        /* display */,
  3500.     GC            /* gc */,
  3501.     int            /* clip_x_origin */,
  3502.     int            /* clip_y_origin */
  3503. #endif
  3504. );
  3505.  
  3506. extern XSetClipRectangles(
  3507. #if NeedFunctionPrototypes
  3508.     Display*        /* display */,
  3509.     GC            /* gc */,
  3510.     int            /* clip_x_origin */,
  3511.     int            /* clip_y_origin */,
  3512.     XRectangle*        /* rectangles */,
  3513.     int            /* n */,
  3514.     int            /* ordering */
  3515. #endif
  3516. );
  3517.  
  3518. extern XSetCloseDownMode(
  3519. #if NeedFunctionPrototypes
  3520.     Display*        /* display */,
  3521.     int            /* close_mode */
  3522. #endif
  3523. );
  3524.  
  3525. extern XSetCommand(
  3526. #if NeedFunctionPrototypes
  3527.     Display*        /* display */,
  3528.     Window        /* w */,
  3529.     char**        /* argv */,
  3530.     int            /* argc */
  3531. #endif
  3532. );
  3533.  
  3534. extern XSetDashes(
  3535. #if NeedFunctionPrototypes
  3536.     Display*        /* display */,
  3537.     GC            /* gc */,
  3538.     int            /* dash_offset */,
  3539.      char*    /* dash_list */,
  3540.     int            /* n */
  3541. #endif
  3542. );
  3543.  
  3544. extern XSetFillRule(
  3545. #if NeedFunctionPrototypes
  3546.     Display*        /* display */,
  3547.     GC            /* gc */,
  3548.     int            /* fill_rule */
  3549. #endif
  3550. );
  3551.  
  3552. extern XSetFillStyle(
  3553. #if NeedFunctionPrototypes
  3554.     Display*        /* display */,
  3555.     GC            /* gc */,
  3556.     int            /* fill_style */
  3557. #endif
  3558. );
  3559.  
  3560. extern XSetFont(
  3561. #if NeedFunctionPrototypes
  3562.     Display*        /* display */,
  3563.     GC            /* gc */,
  3564.     Font        /* font */
  3565. #endif
  3566. );
  3567.  
  3568. extern XSetFontPath(
  3569. #if NeedFunctionPrototypes
  3570.     Display*        /* display */,
  3571.     char**        /* directories */,
  3572.     int            /* ndirs */         
  3573. #endif
  3574. );
  3575.  
  3576. extern XSetForeground(
  3577. #if NeedFunctionPrototypes
  3578.     Display*        /* display */,
  3579.     GC            /* gc */,
  3580.     unsigned long    /* foreground */
  3581. #endif
  3582. );
  3583.  
  3584. extern XSetFunction(
  3585. #if NeedFunctionPrototypes
  3586.     Display*        /* display */,
  3587.     GC            /* gc */,
  3588.     int            /* function */
  3589. #endif
  3590. );
  3591.  
  3592. extern XSetGraphicsExposures(
  3593. #if NeedFunctionPrototypes
  3594.     Display*        /* display */,
  3595.     GC            /* gc */,
  3596.     Bool        /* graphics_exposures */
  3597. #endif
  3598. );
  3599.  
  3600. extern XSetIconName(
  3601. #if NeedFunctionPrototypes
  3602.     Display*        /* display */,
  3603.     Window        /* w */,
  3604.      char*    /* icon_name */
  3605. #endif
  3606. );
  3607.  
  3608. extern XSetInputFocus(
  3609. #if NeedFunctionPrototypes
  3610.     Display*        /* display */,
  3611.     Window        /* focus */,
  3612.     int            /* revert_to */,
  3613.     Time        /* time */
  3614. #endif
  3615. );
  3616.  
  3617. extern XSetLineAttributes(
  3618. #if NeedFunctionPrototypes
  3619.     Display*        /* display */,
  3620.     GC            /* gc */,
  3621.     unsigned int    /* line_width */,
  3622.     int            /* line_style */,
  3623.     int            /* cap_style */,
  3624.     int            /* join_style */
  3625. #endif
  3626. );
  3627.  
  3628. extern int XSetModifierMapping(
  3629. #if NeedFunctionPrototypes
  3630.     Display*        /* display */,
  3631.     XModifierKeymap*    /* modmap */
  3632. #endif
  3633. );
  3634.  
  3635. extern XSetPlaneMask(
  3636. #if NeedFunctionPrototypes
  3637.     Display*        /* display */,
  3638.     GC            /* gc */,
  3639.     unsigned long    /* plane_mask */
  3640. #endif
  3641. );
  3642.  
  3643. extern int XSetPointerMapping(
  3644. #if NeedFunctionPrototypes
  3645.     Display*        /* display */,
  3646.      unsigned char*    /* map */,
  3647.     int            /* nmap */
  3648. #endif
  3649. );
  3650.  
  3651. extern XSetScreenSaver(
  3652. #if NeedFunctionPrototypes
  3653.     Display*        /* display */,
  3654.     int            /* timeout */,
  3655.     int            /* interval */,
  3656.     int            /* prefer_blanking */,
  3657.     int            /* allow_exposures */
  3658. #endif
  3659. );
  3660.  
  3661. extern XSetSelectionOwner(
  3662. #if NeedFunctionPrototypes
  3663.     Display*        /* display */,
  3664.     Atom            /* selection */,
  3665.     Window        /* owner */,
  3666.     Time        /* time */
  3667. #endif
  3668. );
  3669.  
  3670. extern XSetState(
  3671. #if NeedFunctionPrototypes
  3672.     Display*        /* display */,
  3673.     GC            /* gc */,
  3674.     unsigned long     /* foreground */,
  3675.     unsigned long    /* background */,
  3676.     int            /* function */,
  3677.     unsigned long    /* plane_mask */
  3678. #endif
  3679. );
  3680.  
  3681. extern XSetStipple(
  3682. #if NeedFunctionPrototypes
  3683.     Display*        /* display */,
  3684.     GC            /* gc */,
  3685.     Pixmap        /* stipple */
  3686. #endif
  3687. );
  3688.  
  3689. extern XSetSubwindowMode(
  3690. #if NeedFunctionPrototypes
  3691.     Display*        /* display */,
  3692.     GC            /* gc */,
  3693.     int            /* subwindow_mode */
  3694. #endif
  3695. );
  3696.  
  3697. extern XSetTSOrigin(
  3698. #if NeedFunctionPrototypes
  3699.     Display*        /* display */,
  3700.     GC            /* gc */,
  3701.     int            /* ts_x_origin */,
  3702.     int            /* ts_y_origin */
  3703. #endif
  3704. );
  3705.  
  3706. extern XSetTile(
  3707. #if NeedFunctionPrototypes
  3708.     Display*        /* display */,
  3709.     GC            /* gc */,
  3710.     Pixmap        /* tile */
  3711. #endif
  3712. );
  3713.  
  3714. extern XSetWindowBackground(
  3715. #if NeedFunctionPrototypes
  3716.     Display*        /* display */,
  3717.     Window        /* w */,
  3718.     unsigned long    /* background_pixel */
  3719. #endif
  3720. );
  3721.  
  3722. extern XSetWindowBackgroundPixmap(
  3723. #if NeedFunctionPrototypes
  3724.     Display*        /* display */,
  3725.     Window        /* w */,
  3726.     Pixmap        /* background_pixmap */
  3727. #endif
  3728. );
  3729.  
  3730. extern XSetWindowBorder(
  3731. #if NeedFunctionPrototypes
  3732.     Display*        /* display */,
  3733.     Window        /* w */,
  3734.     unsigned long    /* border_pixel */
  3735. #endif
  3736. );
  3737.  
  3738. extern XSetWindowBorderPixmap(
  3739. #if NeedFunctionPrototypes
  3740.     Display*        /* display */,
  3741.     Window        /* w */,
  3742.     Pixmap        /* border_pixmap */
  3743. #endif
  3744. );
  3745.  
  3746. extern XSetWindowBorderWidth(
  3747. #if NeedFunctionPrototypes
  3748.     Display*        /* display */,
  3749.     Window        /* w */,
  3750.     unsigned int    /* width */
  3751. #endif
  3752. );
  3753.  
  3754. extern XSetWindowColormap(
  3755. #if NeedFunctionPrototypes
  3756.     Display*        /* display */,
  3757.     Window        /* w */,
  3758.     Colormap        /* colormap */
  3759. #endif
  3760. );
  3761.  
  3762. extern XStoreBuffer(
  3763. #if NeedFunctionPrototypes
  3764.     Display*        /* display */,
  3765.      char*    /* bytes */,
  3766.     int            /* nbytes */,
  3767.     int            /* buffer */
  3768. #endif
  3769. );
  3770.  
  3771. extern XStoreBytes(
  3772. #if NeedFunctionPrototypes
  3773.     Display*        /* display */,
  3774.      char*    /* bytes */,
  3775.     int            /* nbytes */
  3776. #endif
  3777. );
  3778.  
  3779. extern XStoreColor(
  3780. #if NeedFunctionPrototypes
  3781.     Display*        /* display */,
  3782.     Colormap        /* colormap */,
  3783.     XColor*        /* color */
  3784. #endif
  3785. );
  3786.  
  3787. extern XStoreColors(
  3788. #if NeedFunctionPrototypes
  3789.     Display*        /* display */,
  3790.     Colormap        /* colormap */,
  3791.     XColor*        /* color */,
  3792.     int            /* ncolors */
  3793. #endif
  3794. );
  3795.  
  3796. extern XStoreName(
  3797. #if NeedFunctionPrototypes
  3798.     Display*        /* display */,
  3799.     Window        /* w */,
  3800.     char*    /* window_name */
  3801. #endif
  3802. );
  3803.  
  3804. extern XStoreNamedColor(
  3805. #if NeedFunctionPrototypes
  3806.     Display*        /* display */,
  3807.     Colormap        /* colormap */,
  3808.     char*    /* color */,
  3809.     unsigned long    /* pixel */,
  3810.     int            /* flags */
  3811. #endif
  3812. );
  3813.  
  3814. extern XSync(
  3815. #if NeedFunctionPrototypes
  3816.     Display*        /* display */,
  3817.     Bool        /* discard */
  3818. #endif
  3819. );
  3820.  
  3821. extern XTextExtents(
  3822. #if NeedFunctionPrototypes
  3823.     XFontStruct*    /* font_struct */,
  3824.     char*    /* string */,
  3825.     int            /* nchars */,
  3826.     int*        /* direction_return */,
  3827.     int*        /* font_ascent_return */,
  3828.     int*        /* font_descent_return */,
  3829.     XCharStruct*    /* overall_return */
  3830. #endif
  3831. );
  3832.  
  3833. extern XTextExtents16(
  3834. #if NeedFunctionPrototypes
  3835.     XFontStruct*    /* font_struct */,
  3836.      XChar2b*    /* string */,
  3837.     int            /* nchars */,
  3838.     int*        /* direction_return */,
  3839.     int*        /* font_ascent_return */,
  3840.     int*        /* font_descent_return */,
  3841.     XCharStruct*    /* overall_return */
  3842. #endif
  3843. );
  3844.  
  3845. extern int XTextWidth(
  3846. #if NeedFunctionPrototypes
  3847.     XFontStruct*    /* font_struct */,
  3848.      char*    /* string */,
  3849.     int            /* count */
  3850. #endif
  3851. );
  3852.  
  3853. extern int XTextWidth16(
  3854. #if NeedFunctionPrototypes
  3855.     XFontStruct*    /* font_struct */,
  3856.      XChar2b*    /* string */,
  3857.     int            /* count */
  3858. #endif
  3859. );
  3860.  
  3861. extern Bool XTranslateCoordinates(
  3862. #if NeedFunctionPrototypes
  3863.     Display*        /* display */,
  3864.     Window        /* src_w */,
  3865.     Window        /* dest_w */,
  3866.     int            /* src_x */,
  3867.     int            /* src_y */,
  3868.     int*        /* dest_x_return */,
  3869.     int*        /* dest_y_return */,
  3870.     Window*        /* child_return */
  3871. #endif
  3872. );
  3873.  
  3874. extern XUndefineCursor(
  3875. #if NeedFunctionPrototypes
  3876.     Display*        /* display */,
  3877.     Window        /* w */
  3878. #endif
  3879. );
  3880.  
  3881. extern XUngrabButton(
  3882. #if NeedFunctionPrototypes
  3883.     Display*        /* display */,
  3884.     unsigned int    /* button */,
  3885.     unsigned int    /* modifiers */,
  3886.     Window        /* grab_window */
  3887. #endif
  3888. );
  3889.  
  3890. extern XUngrabKey(
  3891. #if NeedFunctionPrototypes
  3892.     Display*        /* display */,
  3893.     int            /* keycode */,
  3894.     unsigned int    /* modifiers */,
  3895.     Window        /* grab_window */
  3896. #endif
  3897. );
  3898.  
  3899. extern XUngrabKeyboard(
  3900. #if NeedFunctionPrototypes
  3901.     Display*        /* display */,
  3902.     Time        /* time */
  3903. #endif
  3904. );
  3905.  
  3906. extern XUngrabPointer(
  3907. #if NeedFunctionPrototypes
  3908.     Display*        /* display */,
  3909.     Time        /* time */
  3910. #endif
  3911. );
  3912.  
  3913. extern XUngrabServer(
  3914. #if NeedFunctionPrototypes
  3915.     Display*        /* display */
  3916. #endif
  3917. );
  3918.  
  3919. extern XUninstallColormap(
  3920. #if NeedFunctionPrototypes
  3921.     Display*        /* display */,
  3922.     Colormap        /* colormap */
  3923. #endif
  3924. );
  3925.  
  3926. extern XUnloadFont(
  3927. #if NeedFunctionPrototypes
  3928.     Display*        /* display */,
  3929.     Font        /* font */
  3930. #endif
  3931. );
  3932.  
  3933. extern XUnmapSubwindows(
  3934. #if NeedFunctionPrototypes
  3935.     Display*        /* display */,
  3936.     Window        /* w */
  3937. #endif
  3938. );
  3939.  
  3940. extern XUnmapWindow(
  3941. #if NeedFunctionPrototypes
  3942.     Display*        /* display */,
  3943.     Window        /* w */
  3944. #endif
  3945. );
  3946.  
  3947. extern int XVendorRelease(
  3948. #if NeedFunctionPrototypes
  3949.     Display*        /* display */
  3950. #endif
  3951. );
  3952.  
  3953. extern XWarpPointer(
  3954. #if NeedFunctionPrototypes
  3955.     Display*        /* display */,
  3956.     Window        /* src_w */,
  3957.     Window        /* dest_w */,
  3958.     int            /* src_x */,
  3959.     int            /* src_y */,
  3960.     unsigned int    /* src_width */,
  3961.     unsigned int    /* src_height */,
  3962.     int            /* dest_x */,
  3963.     int            /* dest_y */         
  3964. #endif
  3965. );
  3966.  
  3967. extern int XWidthMMOfScreen(
  3968. #if NeedFunctionPrototypes
  3969.     Screen*        /* screen */
  3970. #endif
  3971. );
  3972.  
  3973. extern int XWidthOfScreen(
  3974. #if NeedFunctionPrototypes
  3975.     Screen*        /* screen */
  3976. #endif
  3977. );
  3978.  
  3979. extern XWindowEvent(
  3980. #if NeedFunctionPrototypes
  3981.     Display*        /* display */,
  3982.     Window        /* w */,
  3983.     long        /* event_mask */,
  3984.     XEvent*        /* event_return */
  3985. #endif
  3986. );
  3987.  
  3988. extern int XWriteBitmapFile(
  3989. #if NeedFunctionPrototypes
  3990.     Display*        /* display */,
  3991.     char*    /* filename */,
  3992.     Pixmap        /* bitmap */,
  3993.     unsigned int    /* width */,
  3994.     unsigned int    /* height */,
  3995.     int            /* x_hot */,
  3996.     int            /* y_hot */             
  3997. #endif
  3998. );
  3999.  
  4000. extern Bool XSupportsLocale(
  4001. #if NeedFunctionPrototypes
  4002.     void
  4003. #endif
  4004. );
  4005.  
  4006. extern char *XSetLocaleModifiers(
  4007. #if NeedFunctionPrototypes
  4008.      char*    /* modifier_list */
  4009. #endif
  4010. );
  4011.  
  4012. extern XFontSet XCreateFontSet(
  4013. #if NeedFunctionPrototypes
  4014.     Display*        /* display */,
  4015.      char*    /* base_font_name_list */,
  4016.     char***        /* missing_charset_list */,
  4017.     int*        /* missing_charset_count */,
  4018.     char**        /* def_string */
  4019. #endif
  4020. );
  4021.  
  4022. extern void XFreeFontSet(
  4023. #if NeedFunctionPrototypes
  4024.     Display*        /* display */,
  4025.     XFontSet        /* font_set */
  4026. #endif
  4027. );
  4028.  
  4029. extern int XFontsOfFontSet(
  4030. #if NeedFunctionPrototypes
  4031.     XFontSet        /* font_set */,
  4032.     XFontStruct***    /* font_struct_list */,
  4033.     char***        /* font_name_list */
  4034. #endif
  4035. );
  4036.  
  4037. extern char *XBaseFontNameListOfFontSet(
  4038. #if NeedFunctionPrototypes
  4039.     XFontSet        /* font_set */
  4040. #endif
  4041. );
  4042.  
  4043. extern char *XLocaleOfFontSet(
  4044. #if NeedFunctionPrototypes
  4045.     XFontSet        /* font_set */
  4046. #endif
  4047. );
  4048.  
  4049. extern Bool XContextDependentDrawing(
  4050. #if NeedFunctionPrototypes
  4051.     XFontSet        /* font_set */
  4052. #endif
  4053. );
  4054.  
  4055. extern XFontSetExtents *XExtentsOfFontSet(
  4056. #if NeedFunctionPrototypes
  4057.     XFontSet        /* font_set */
  4058. #endif
  4059. );
  4060.  
  4061. extern int XmbTextEscapement(
  4062. #if NeedFunctionPrototypes
  4063.     XFontSet        /* font_set */,
  4064.      char*    /* text */,
  4065.     int            /* bytes_text */
  4066. #endif
  4067. );
  4068.  
  4069. extern int XwcTextEscapement(
  4070. #if NeedFunctionPrototypes
  4071.     XFontSet        /* font_set */,
  4072.     wchar_t*        /* text */,
  4073.     int            /* num_wchars */
  4074. #endif
  4075. );
  4076.  
  4077. extern int XmbTextExtents(
  4078. #if NeedFunctionPrototypes
  4079.     XFontSet        /* font_set */,
  4080.      char*    /* text */,
  4081.     int            /* bytes_text */,
  4082.     XRectangle*        /* overall_ink_return */,
  4083.     XRectangle*        /* overall_logical_return */
  4084. #endif
  4085. );
  4086.  
  4087. extern int XwcTextExtents(
  4088. #if NeedFunctionPrototypes
  4089.     XFontSet        /* font_set */,
  4090.     wchar_t*        /* text */,
  4091.     int            /* num_wchars */,
  4092.     XRectangle*        /* overall_ink_return */,
  4093.     XRectangle*        /* overall_logical_return */
  4094. #endif
  4095. );
  4096.  
  4097. extern Status XmbTextPerCharExtents(
  4098. #if NeedFunctionPrototypes
  4099.     XFontSet        /* font_set */,
  4100.      char*    /* text */,
  4101.     int            /* bytes_text */,
  4102.     XRectangle*        /* ink_extents_buffer */,
  4103.     XRectangle*        /* logical_extents_buffer */,
  4104.     int            /* buffer_size */,
  4105.     int*        /* num_chars */,
  4106.     XRectangle*        /* overall_ink_return */,
  4107.     XRectangle*        /* overall_logical_return */
  4108. #endif
  4109. );
  4110.  
  4111. extern Status XwcTextPerCharExtents(
  4112. #if NeedFunctionPrototypes
  4113.     XFontSet        /* font_set */,
  4114.     wchar_t*        /* text */,
  4115.     int            /* num_wchars */,
  4116.     XRectangle*        /* ink_extents_buffer */,
  4117.     XRectangle*        /* logical_extents_buffer */,
  4118.     int            /* buffer_size */,
  4119.     int*        /* num_chars */,
  4120.     XRectangle*        /* overall_ink_return */,
  4121.     XRectangle*        /* overall_logical_return */
  4122. #endif
  4123. );
  4124.  
  4125. extern void XmbDrawText(
  4126. #if NeedFunctionPrototypes
  4127.     Display*        /* display */,
  4128.     Drawable        /* d */,
  4129.     GC            /* gc */,
  4130.     int            /* x */,
  4131.     int            /* y */,
  4132.     XmbTextItem*    /* text_items */,
  4133.     int            /* nitems */
  4134. #endif
  4135. );
  4136.  
  4137. extern void XwcDrawText(
  4138. #if NeedFunctionPrototypes
  4139.     Display*        /* display */,
  4140.     Drawable        /* d */,
  4141.     GC            /* gc */,
  4142.     int            /* x */,
  4143.     int            /* y */,
  4144.     XwcTextItem*    /* text_items */,
  4145.     int            /* nitems */
  4146. #endif
  4147. );
  4148.  
  4149. extern void XmbDrawString(
  4150. #if NeedFunctionPrototypes
  4151.     Display*        /* display */,
  4152.     Drawable        /* d */,
  4153.     XFontSet        /* font_set */,
  4154.     GC            /* gc */,
  4155.     int            /* x */,
  4156.     int            /* y */,
  4157.      char*    /* text */,
  4158.     int            /* bytes_text */
  4159. #endif
  4160. );
  4161.  
  4162. extern void XwcDrawString(
  4163. #if NeedFunctionPrototypes
  4164.     Display*        /* display */,
  4165.     Drawable        /* d */,
  4166.     XFontSet        /* font_set */,
  4167.     GC            /* gc */,
  4168.     int            /* x */,
  4169.     int            /* y */,
  4170.     wchar_t*        /* text */,
  4171.     int            /* num_wchars */
  4172. #endif
  4173. );
  4174.  
  4175. extern void XmbDrawImageString(
  4176. #if NeedFunctionPrototypes
  4177.     Display*        /* display */,
  4178.     Drawable        /* d */,
  4179.     XFontSet        /* font_set */,
  4180.     GC            /* gc */,
  4181.     int            /* x */,
  4182.     int            /* y */,
  4183.      char*    /* text */,
  4184.     int            /* bytes_text */
  4185. #endif
  4186. );
  4187.  
  4188. extern void XwcDrawImageString(
  4189. #if NeedFunctionPrototypes
  4190.     Display*        /* display */,
  4191.     Drawable        /* d */,
  4192.     XFontSet        /* font_set */,
  4193.     GC            /* gc */,
  4194.     int            /* x */,
  4195.     int            /* y */,
  4196.     wchar_t*        /* text */,
  4197.     int            /* num_wchars */
  4198. #endif
  4199. );
  4200.  
  4201. extern XIM XOpenIM(
  4202. #if NeedFunctionPrototypes
  4203.     Display*            /* dpy */,
  4204.     struct _XrmHashBucketRec*    /* rdb */,
  4205.     char*            /* res_name */,
  4206.     char*            /* res_class */
  4207. #endif
  4208. );
  4209.  
  4210. extern Status XCloseIM(
  4211. #if NeedFunctionPrototypes
  4212.     XIM /* im */
  4213. #endif
  4214. );
  4215.  
  4216. extern char *XGetIMValues(
  4217. #if NeedVarargsPrototypes
  4218.     XIM /* im */, ...
  4219. #endif
  4220. );
  4221.  
  4222. extern Display *XDisplayOfIM(
  4223. #if NeedFunctionPrototypes
  4224.     XIM /* im */
  4225. #endif
  4226. );
  4227.  
  4228. extern char *XLocaleOfIM(
  4229. #if NeedFunctionPrototypes
  4230.     XIM /* im*/
  4231. #endif
  4232. );
  4233.  
  4234. extern XIC XCreateIC(
  4235. #if NeedVarargsPrototypes
  4236.     XIM /* im */, ...
  4237. #endif
  4238. );
  4239.  
  4240. extern void XDestroyIC(
  4241. #if NeedFunctionPrototypes
  4242.     XIC /* ic */
  4243. #endif
  4244. );
  4245.  
  4246. extern void XSetICFocus(
  4247. #if NeedFunctionPrototypes
  4248.     XIC /* ic */
  4249. #endif
  4250. );
  4251.  
  4252. extern void XUnsetICFocus(
  4253. #if NeedFunctionPrototypes
  4254.     XIC /* ic */
  4255. #endif
  4256. );
  4257.  
  4258. extern wchar_t *XwcResetIC(
  4259. #if NeedFunctionPrototypes
  4260.     XIC /* ic */
  4261. #endif
  4262. );
  4263.  
  4264. extern char *XmbResetIC(
  4265. #if NeedFunctionPrototypes
  4266.     XIC /* ic */
  4267. #endif
  4268. );
  4269.  
  4270. extern char *XSetICValues(
  4271. #if NeedVarargsPrototypes
  4272.     XIC /* ic */, ...
  4273. #endif
  4274. );
  4275.  
  4276. extern char *XGetICValues(
  4277. #if NeedVarargsPrototypes
  4278.     XIC /* ic */, ...
  4279. #endif
  4280. );
  4281.  
  4282. extern XIM XIMOfIC(
  4283. #if NeedFunctionPrototypes
  4284.     XIC /* ic */
  4285. #endif
  4286. );
  4287.  
  4288. extern Bool XFilterEvent(
  4289. #if NeedFunctionPrototypes
  4290.     XEvent*    /* event */,
  4291.     Window    /* window */
  4292. #endif
  4293. );
  4294.  
  4295. extern int XmbLookupString(
  4296. #if NeedFunctionPrototypes
  4297.     XIC            /* ic */,
  4298.     XKeyPressedEvent*    /* event */,
  4299.     char*        /* buffer_return */,
  4300.     int            /* bytes_buffer */,
  4301.     KeySym*        /* keysym_return */,
  4302.     Status*        /* status_return */
  4303. #endif
  4304. );
  4305.  
  4306. extern int XwcLookupString(
  4307. #if NeedFunctionPrototypes
  4308.     XIC            /* ic */,
  4309.     XKeyPressedEvent*    /* event */,
  4310.     wchar_t*        /* buffer_return */,
  4311.     int            /* wchars_buffer */,
  4312.     KeySym*        /* keysym_return */,
  4313.     Status*        /* status_return */
  4314. #endif
  4315. );
  4316.  
  4317. extern XVaNestedList XVaCreateNestedList(
  4318. #if NeedVarargsPrototypes
  4319.     int /*unused*/, ...
  4320. #endif
  4321. );
  4322. #endif
  4323. _XFUNCPROTOEND
  4324.  
  4325.  
  4326. /*
  4327. #ifndef MAKELIBRARY
  4328. #include <X11/X11_pragmas.h>
  4329. #include <X11/Xt_pragmas.h>
  4330. #endif
  4331. */
  4332.  
  4333. #include "amigax:amigax_proto.h"
  4334.  
  4335. #include "unix.h"
  4336.  
  4337. #endif /* _XLIB_H_ */
  4338.